]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Set the ifindex to DELETED after we notify zebra
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 26 Jul 2017 13:57:35 +0000 (09:57 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 26 Jul 2017 18:17:35 +0000 (14:17 -0400)
The code path for a deleted interface was calling
zebra with a IFINDEX_DELETED, which caused zebra
to bitch and moan about the issue.  Since the
only thing this function does is call zebra
to deregister the RA stuff, don't set the
ifindex to DELETED till afterwords.

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

index 8bf5477a61673d5bccfbadde69ec64a89415c45f..4870e54aec991b390db1021877aff58464dbc433 100644 (file)
@@ -269,8 +269,6 @@ static int bgp_interface_delete(int command, struct zclient *zclient,
        if (!ifp) /* This may happen if we've just unregistered for a VRF. */
                return 0;
 
-       ifp->ifindex = IFINDEX_DELETED;
-
        if (BGP_DEBUG(zebra, ZEBRA))
                zlog_debug("Rx Intf del VRF %u IF %s", vrf_id, ifp->name);
 
@@ -279,6 +277,8 @@ static int bgp_interface_delete(int command, struct zclient *zclient,
                return 0;
 
        bgp_update_interface_nbrs(bgp, ifp, NULL);
+
+       ifp->ifindex = IFINDEX_DELETED;
        return 0;
 }