summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-01-24 15:37:54 -0500
committerDonald Sharp <sharpd@nvidia.com>2022-01-26 08:21:03 -0500
commit0955f8757b4df61bf052072aceac6bcbae13f431 (patch)
treedce74c5f0807577b88df74178839026d429a8e78 /zebra/zebra_vrf.c
parent7590fd4965ec41c7f8392aede804a7cc92a7c390 (diff)
zebra: Don't double delete the table we are cleaning up
vrf_disable is always called first before vrf_delete. The rnh_table and rnh_table_multicast tables are already deleted as part of vrf_disable. No need to do it again. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index 5913936d57..842dc3f576 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -262,9 +262,6 @@ static int zebra_vrf_delete(struct vrf *vrf)
{
struct zebra_vrf *zvrf = vrf->info;
struct other_route_table *otable;
- struct route_table *table;
- afi_t afi;
- safi_t safi;
unsigned i;
assert(zvrf);
@@ -295,23 +292,6 @@ static int zebra_vrf_delete(struct vrf *vrf)
zebra_vxlan_close_tables(zvrf);
zebra_mpls_close_tables(zvrf);
- /* release allocated memory */
- for (afi = AFI_IP; afi <= AFI_IP6; afi++) {
- for (safi = SAFI_UNICAST; safi <= SAFI_MULTICAST; safi++) {
- table = zvrf->table[afi][safi];
- if (table) {
- zebra_router_release_table(zvrf, zvrf->table_id,
- afi, safi);
- zvrf->table[afi][safi] = NULL;
- }
- }
-
- if (zvrf->rnh_table[afi])
- route_table_finish(zvrf->rnh_table[afi]);
- if (zvrf->rnh_table_multicast[afi])
- route_table_finish(zvrf->rnh_table[afi]);
- }
-
otable = otable_pop(&zvrf->other_tables);
while (otable) {
zebra_router_release_table(zvrf, otable->table_id,