]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #2870 from AnuradhaKaruppiah/bgp-default-del
authorRuss White <russ@riw.us>
Sat, 25 Aug 2018 00:19:17 +0000 (20:19 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Aug 2018 00:19:17 +0000 (20:19 -0400)
bgpd: unregister VNI learning from zebra on default instance delete

bgpd/bgpd.c

index 5d9609ae018f18b3cfad0018816d2633f0e5d6c2..7ff5053ce37a8907e65c299acdb1aea15847b981 100644 (file)
@@ -3187,15 +3187,16 @@ int bgp_delete(struct bgp *bgp)
                                .import_redirect_rtlist);
                bgp->vpn_policy[afi].import_redirect_rtlist = NULL;
        }
-       /* Remove visibility via the master list - there may however still be
-        * routes to be processed still referencing the struct bgp.
-        */
-       listnode_delete(bm->bgp, bgp);
 
        /* Deregister from Zebra, if needed */
        if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
                bgp_zebra_instance_deregister(bgp);
 
+       /* Remove visibility via the master list - there may however still be
+        * routes to be processed still referencing the struct bgp.
+        */
+       listnode_delete(bm->bgp, bgp);
+
        /* Free interfaces in this instance. */
        bgp_if_finish(bgp);