bgpd, zebra: Use next hop tracking for connected routes too
Allow next hop tracking to work with connected routes
And cleanup obsolete code in bgp_scan and bgp_import.
Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Edits: Paul Jakma <paul.jakma@hpe.com> Rebase re-ordering conflicts with
NHT route-map, potential errors.
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index eb0fe17..af9c030 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -230,7 +230,6 @@
struct listnode *node, *nnode;
int *socket;
struct interface *ifp;
- extern struct zclient *zlookup;
/* it only makes sense for this to be called on a clean exit */
assert (status == 0);
@@ -292,9 +291,6 @@
/* reverse bgp_route_map_init/route_map_init */
route_map_finish ();
- /* reverse bgp_scan_init */
- bgp_scan_finish ();
-
/* reverse access_list_init */
access_list_add_hook (NULL);
access_list_delete_hook (NULL);
@@ -319,13 +315,14 @@
bgp_address_destroy();
bgp_scan_destroy();
bgp_zebra_destroy();
- if (zlookup)
- zclient_free (zlookup);
if (bgp_nexthop_buf)
stream_free (bgp_nexthop_buf);
if (bgp_ifindices_buf)
stream_free (bgp_ifindices_buf);
+ /* reverse bgp_scan_init */
+ bgp_scan_finish ();
+
/* reverse bgp_master_init */
if (bm->master)
thread_master_free (bm->master);