]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgp: Reorg cleanup to align process and bgp instance init/destroy
authorLou Berger <lberger@labn.net>
Tue, 12 Jan 2016 18:42:03 +0000 (13:42 -0500)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Wed, 24 Aug 2016 17:57:32 +0000 (13:57 -0400)
bgp_address_destroy became per-bgp instance.  Moved the
call to the bgp_address_destroy function to the bgp delete.

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 637035710a2f8e1e5944ee714135b7f88ac15ac4)

bgpd/bgp_main.c
bgpd/bgpd.c

index 0d24c9c29485598084fd835cdb238ed510f6b658..20fa138ce89b53aa849f586ba910aeeae5fd7707 100644 (file)
@@ -227,7 +227,6 @@ bgp_exit (int status)
 {
   struct bgp *bgp;
   struct listnode *node, *nnode;
-  extern struct zclient *zclient;
 
   /* it only makes sense for this to be called on a clean exit */
   assert (status == 0);
@@ -277,8 +276,8 @@ bgp_exit (int status)
   bgp_vrf_terminate ();
   cmd_terminate ();
   vty_terminate ();
-  if (zclient)
-    zclient_free (zclient);
+
+  bgp_zebra_destroy();
   if (bgp_nexthop_buf)
     stream_free (bgp_nexthop_buf);
   if (bgp_ifindices_buf)
index b18572c07a692e7c84fcc71ce5f6e8a081dbf24d..f63f3f8f94dc460d5bcd0c12851c837e342182f4 100644 (file)
@@ -3178,6 +3178,8 @@ bgp_delete (struct bgp *bgp)
   /* Free interfaces in this instance. */
   bgp_if_finish (bgp);
 
+  bgp_address_destroy (bgp);
+
   thread_master_free_unused(bm->master);
   bgp_unlock(bgp);  /* initial reference */