]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd, lib, zebra: Cleanup formatting issues found
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 29 Apr 2018 18:35:39 +0000 (14:35 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 8 May 2018 23:24:15 +0000 (19:24 -0400)
Cleanup the formating issues found.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_evpn.c
bgpd/bgp_route.c
bgpd/bgpd.c
lib/command.c
zebra/zebra_vxlan.c

index e3158e2b109e70ea3edd7bfa5ebc4d02cff4f9b2..e910e2ef64aa646254377ecf815ba8914ab7616e 100644 (file)
@@ -4422,8 +4422,9 @@ int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni)
        vpn = bgp_evpn_lookup_vni(bgp, vni);
        if (!vpn) {
                if (bgp_debug_zebra(NULL))
-                       zlog_warn("%u: VNI hash entry for VNI %u not "
-                                 "found at DEL", bgp->vrf_id, vni);
+                       zlog_warn(
+                               "%u: VNI hash entry for VNI %u not found at DEL",
+                               bgp->vrf_id, vni);
                return 0;
        }
 
index 401a7e854998d2d5f3de595447b77221058b3fcf..1a19cfc1a90a6c00b5e2f2c26ad23d8668aeafd1 100644 (file)
@@ -2369,15 +2369,13 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
                        if (bgp->adv_cmd_rmap[afi][safi].map) {
                                int ret = 0;
 
-                               ret =
-                                       route_map_apply(
-                                               bgp->adv_cmd_rmap[afi][safi].map,
-                                               &rn->p, RMAP_BGP, new_select);
+                               ret = route_map_apply(
+                                       bgp->adv_cmd_rmap[afi][safi].map,
+                                       &rn->p, RMAP_BGP, new_select);
                                if (ret == RMAP_MATCH)
-                                       bgp_evpn_advertise_type5_route(bgp,
-                                                                      &rn->p,
-                                                                      new_select->attr,
-                                                                      afi, safi);
+                                       bgp_evpn_advertise_type5_route(
+                                               bgp, &rn->p, new_select->attr,
+                                               afi, safi);
                        } else {
                                bgp_evpn_advertise_type5_route(bgp,
                                                               &rn->p,
index 36aa6b3c172c88f3ffcbfa48158d84aac0c070cf..09a4fda7b2befaee87b0abf141594cab2df6ae6e 100644 (file)
@@ -4085,15 +4085,18 @@ static int peer_af_flag_modify(struct peer *peer, afi_t afi, safi_t safi,
        if (afi == AFI_L2VPN && safi == SAFI_EVPN) {
                if (set) {
 
-                       /* if we are setting NEXTHOP_SELF, we need to unset the
-                        * NEXTHOP_UNCHANGED flag */
+                       /*
+                        * if we are setting NEXTHOP_SELF, we need to unset the
+                        * NEXTHOP_UNCHANGED flag
+                        */
                        if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
                            CHECK_FLAG(flag, PEER_FLAG_FORCE_NEXTHOP_SELF))
                                UNSET_FLAG(peer->af_flags[afi][safi],
                                           PEER_FLAG_NEXTHOP_UNCHANGED);
                } else {
 
-                       /* if we are unsetting NEXTHOP_SELF, we need to set the
+                       /*
+                        * if we are unsetting NEXTHOP_SELF, we need to set the
                         * NEXTHOP_UNCHANGED flag to reset the defaults for EVPN
                         */
                        if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
@@ -7140,8 +7143,9 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
 
        /* atribute-unchanged. */
        if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_AS_PATH_UNCHANGED)
-           || (safi != SAFI_EVPN &&
-               peer_af_flag_check(peer, afi, safi, PEER_FLAG_NEXTHOP_UNCHANGED))
+           || (safi != SAFI_EVPN
+               && peer_af_flag_check(peer, afi, safi,
+                                     PEER_FLAG_NEXTHOP_UNCHANGED))
            || peer_af_flag_check(peer, afi, safi, PEER_FLAG_MED_UNCHANGED)) {
 
                if (!peer_group_active(peer)
index d0417408b26ab19b305d063e6075fd9a668c36af..fb558b64d324f1460114b39a2618403d1bbcab43 100644 (file)
@@ -530,15 +530,16 @@ static int config_write_host(struct vty *vty)
                vty_out(vty, "domainname %s\n", cmd_domainname_get());
 
        /* The following are all configuration commands that are not sent to
-         * watchfrr.  For instance watchfrr is hardcoded to log to syslog so
-         * we would always display 'log syslog informational' in the config
-         * which would cause other daemons to then switch to syslog when they
-         * parse frr.conf.
-         */
+        * watchfrr.  For instance watchfrr is hardcoded to log to syslog so
+        * we would always display 'log syslog informational' in the config
+        * which would cause other daemons to then switch to syslog when they
+        * parse frr.conf.
+        */
        if (strcmp(zlog_default->protoname, "WATCHFRR")) {
                if (host.encrypt) {
                        if (host.password_encrypt)
-                               vty_out(vty, "password 8 %s\n", host.password_encrypt);
+                               vty_out(vty, "password 8 %s\n",
+                                       host.password_encrypt);
                        if (host.enable_encrypt)
                                vty_out(vty, "enable password 8 %s\n",
                                        host.enable_encrypt);
@@ -546,23 +547,27 @@ static int config_write_host(struct vty *vty)
                        if (host.password)
                                vty_out(vty, "password %s\n", host.password);
                        if (host.enable)
-                               vty_out(vty, "enable password %s\n", host.enable);
+                               vty_out(vty, "enable password %s\n",
+                                       host.enable);
                }
 
                if (zlog_default->default_lvl != LOG_DEBUG) {
-                       vty_out(vty, "! N.B. The 'log trap' command is deprecated.\n");
+                       vty_out(vty,
+                               "! N.B. The 'log trap' command is deprecated.\n");
                        vty_out(vty, "log trap %s\n",
                                zlog_priority[zlog_default->default_lvl]);
                }
 
                if (host.logfile
-                   && (zlog_default->maxlvl[ZLOG_DEST_FILE] != ZLOG_DISABLED)) {
+                   && (zlog_default->maxlvl[ZLOG_DEST_FILE]
+                       != ZLOG_DISABLED)) {
                        vty_out(vty, "log file %s", host.logfile);
                        if (zlog_default->maxlvl[ZLOG_DEST_FILE]
                            != zlog_default->default_lvl)
                                vty_out(vty, " %s",
                                        zlog_priority
-                                               [zlog_default->maxlvl[ZLOG_DEST_FILE]]);
+                                               [zlog_default->maxlvl
+                                                        [ZLOG_DEST_FILE]]);
                        vty_out(vty, "\n");
                }
 
@@ -571,8 +576,9 @@ static int config_write_host(struct vty *vty)
                        if (zlog_default->maxlvl[ZLOG_DEST_STDOUT]
                            != zlog_default->default_lvl)
                                vty_out(vty, " %s",
-                                       zlog_priority[zlog_default->maxlvl
-                                                             [ZLOG_DEST_STDOUT]]);
+                                       zlog_priority
+                                               [zlog_default->maxlvl
+                                                        [ZLOG_DEST_STDOUT]]);
                        vty_out(vty, "\n");
                }
 
@@ -581,7 +587,8 @@ static int config_write_host(struct vty *vty)
                else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR]
                         != zlog_default->default_lvl)
                        vty_out(vty, "log monitor %s\n",
-                               zlog_priority[zlog_default->maxlvl[ZLOG_DEST_MONITOR]]);
+                               zlog_priority[zlog_default->maxlvl
+                                                     [ZLOG_DEST_MONITOR]]);
 
                if (zlog_default->maxlvl[ZLOG_DEST_SYSLOG] != ZLOG_DISABLED) {
                        vty_out(vty, "log syslog");
@@ -611,7 +618,8 @@ static int config_write_host(struct vty *vty)
                        vty_out(vty, "service password-encryption\n");
 
                if (host.lines >= 0)
-                       vty_out(vty, "service terminal-length %d\n", host.lines);
+                       vty_out(vty, "service terminal-length %d\n",
+                               host.lines);
 
                if (host.motdfile)
                        vty_out(vty, "banner motd file %s\n", host.motdfile);
index a71cb2401192df99d492a24e213e2901e2f4ad18..3278c86b992790b2d3fa47de18ef71cdf621cade 100644 (file)
@@ -3949,11 +3949,11 @@ void zebra_vxlan_evpn_vrf_route_add(vrf_id_t vrf_id, struct ethaddr *rmac,
        if (!zl3vni || !is_l3vni_oper_up(zl3vni))
                return;
 
-        /*
+       /*
         * add the next hop neighbor -
         * neigh to be installed is the ipv6 nexthop neigh
         */
-        zl3vni_remote_nh_add(zl3vni, vtep_ip, rmac, host_prefix);
+       zl3vni_remote_nh_add(zl3vni, vtep_ip, rmac, host_prefix);
 
        /*
         * if the remote vtep is a ipv4 mapped ipv6 address convert it to ipv4
@@ -3969,10 +3969,11 @@ void zebra_vxlan_evpn_vrf_route_add(vrf_id_t vrf_id, struct ethaddr *rmac,
                memcpy(&(ipv4_vtep.ipaddr_v4), &vtep_ip->ipaddr_v4,
                       sizeof(struct in_addr));
 
-        /* add the rmac - remote rmac to be installed is against the ipv4
+       /*
+        * add the rmac - remote rmac to be installed is against the ipv4
         * nexthop address
         */
-        zl3vni_remote_rmac_add(zl3vni, rmac, &ipv4_vtep, host_prefix);
+       zl3vni_remote_rmac_add(zl3vni, rmac, &ipv4_vtep, host_prefix);
 }
 
 /* handle evpn vrf route delete */