mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 21:50:39 +00:00
bgp: Reorg cleanup to align process and bgp instance init/destroy
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)
This commit is contained in:
parent
f43e655ed8
commit
2f35bbfe74
@ -227,7 +227,6 @@ bgp_exit (int status)
|
|||||||
{
|
{
|
||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
extern struct zclient *zclient;
|
|
||||||
|
|
||||||
/* it only makes sense for this to be called on a clean exit */
|
/* it only makes sense for this to be called on a clean exit */
|
||||||
assert (status == 0);
|
assert (status == 0);
|
||||||
@ -277,8 +276,8 @@ bgp_exit (int status)
|
|||||||
bgp_vrf_terminate ();
|
bgp_vrf_terminate ();
|
||||||
cmd_terminate ();
|
cmd_terminate ();
|
||||||
vty_terminate ();
|
vty_terminate ();
|
||||||
if (zclient)
|
|
||||||
zclient_free (zclient);
|
bgp_zebra_destroy();
|
||||||
if (bgp_nexthop_buf)
|
if (bgp_nexthop_buf)
|
||||||
stream_free (bgp_nexthop_buf);
|
stream_free (bgp_nexthop_buf);
|
||||||
if (bgp_ifindices_buf)
|
if (bgp_ifindices_buf)
|
||||||
|
@ -3178,6 +3178,8 @@ bgp_delete (struct bgp *bgp)
|
|||||||
/* Free interfaces in this instance. */
|
/* Free interfaces in this instance. */
|
||||||
bgp_if_finish (bgp);
|
bgp_if_finish (bgp);
|
||||||
|
|
||||||
|
bgp_address_destroy (bgp);
|
||||||
|
|
||||||
thread_master_free_unused(bm->master);
|
thread_master_free_unused(bm->master);
|
||||||
bgp_unlock(bgp); /* initial reference */
|
bgp_unlock(bgp); /* initial reference */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user