]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Using no bgp fast-external-failover prevents vrf intf moves
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 13 Sep 2018 12:59:46 +0000 (08:59 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 13 Sep 2018 13:05:42 +0000 (09:05 -0400)
When using `no bgp fast-external-failover` and a interface moves
from one vrf into another we would not fully process the change.
Fix this code path.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_zebra.c

index 43afc317e9b30e9a1ed4b19d2d9deda01842ce64..13e2fe3cabb12af4a2d80be26e3a7abeb183903e 100644 (file)
@@ -287,6 +287,7 @@ static int bgp_interface_down(int command, struct zclient *zclient,
        struct nbr_connected *nc;
        struct listnode *node, *nnode;
        struct bgp *bgp;
+       struct peer *peer;
 
        bgp = bgp_lookup_by_vrf_id(vrf_id);
        if (!bgp)
@@ -307,11 +308,7 @@ static int bgp_interface_down(int command, struct zclient *zclient,
                bgp_nbr_connected_delete(bgp, nc, 1);
 
        /* Fast external-failover */
-       {
-               struct peer *peer;
-
-               if (CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER))
-                       return 0;
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) {
 
                for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
 #if defined(HAVE_CUMULUS)
@@ -474,6 +471,7 @@ static int bgp_interface_vrf_update(int command, struct zclient *zclient,
        struct nbr_connected *nc;
        struct listnode *node, *nnode;
        struct bgp *bgp;
+       struct peer *peer;
 
        ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id,
                                              &new_vrf_id);
@@ -495,12 +493,7 @@ static int bgp_interface_vrf_update(int command, struct zclient *zclient,
                bgp_nbr_connected_delete(bgp, nc, 1);
 
        /* Fast external-failover */
-       {
-               struct peer *peer;
-
-               if (CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER))
-                       return 0;
-
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) {
                for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
                        if ((peer->ttl != 1) && (peer->gtsm_hops != 1))
                                continue;