diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-04 23:54:48 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-11 12:59:51 +0100 |
commit | 49df081596773e9b04c9b6a253a069602ff830e6 (patch) | |
tree | 8735a49f37f94a8d1366d9bd035667ffda7b8058 /zebra/zebra_vrf.c | |
parent | Merge pull request #10029 from anlancs/doc-bgp-title (diff) | |
download | frr-49df081596773e9b04c9b6a253a069602ff830e6.tar.xz frr-49df081596773e9b04c9b6a253a069602ff830e6.zip |
zebra: fix disabling table manager
42d4b30e introduced per-VRF table manager.
Table manager is allocated when the VRF is created, but it is freed when
the VRF is disabled. When this VRF is re-enabled, zebra ends up with
table manager being NULL pointer and it crashes on any dereference.
Table manager should be freed when the VRF is deleted, not when it's
disabled.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r-- | zebra/zebra_vrf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 66d6d4b4f..1cc7e8932 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -184,8 +184,6 @@ static int zebra_vrf_disable(struct vrf *vrf) zlog_debug("VRF %s id %u is now inactive", zvrf_name(zvrf), zvrf_id(zvrf)); - table_manager_disable(zvrf); - /* Stop any VxLAN-EVPN processing. */ zebra_vxlan_vrf_disable(zvrf); @@ -274,6 +272,8 @@ static int zebra_vrf_delete(struct vrf *vrf) zlog_debug("VRF %s id %u deleted", zvrf_name(zvrf), zvrf_id(zvrf)); + table_manager_disable(zvrf); + /* clean-up work queues */ for (i = 0; i < MQ_SIZE; i++) { struct listnode *lnode, *nnode; |