summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-03-08 14:48:19 -0500
committerGitHub <noreply@github.com>2019-03-08 14:48:19 -0500
commit9af85338e13be4d9be2b7d5b0c976248a970843d (patch)
tree6d889bf8283bb74df0c07840358d91e5a27dd429 /zebra/zebra_vrf.c
parentf74ff6e32a3059b1c4960af7d1ddd0307a8bacb3 (diff)
parentbd4fb6158ddafa10b86a3a382934ed7a8c6e7afc (diff)
Merge pull request #3889 from donaldsharp/rnh_vrf_down_stuff
zebra Rnh vrf down stuff
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index d42aad0d24..1300ca24f3 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -208,8 +208,11 @@ static int zebra_vrf_disable(struct vrf *vrf)
* table, see rib_close_table above
* we no-longer need this pointer.
*/
- for (safi = SAFI_UNICAST; safi <= SAFI_MULTICAST; safi++)
+ for (safi = SAFI_UNICAST; safi <= SAFI_MULTICAST; safi++) {
+ zebra_router_release_table(zvrf, zvrf->table_id, afi,
+ safi);
zvrf->table[afi][safi] = NULL;
+ }
route_table_finish(zvrf->rnh_table[afi]);
zvrf->rnh_table[afi] = NULL;
@@ -256,14 +259,12 @@ static int zebra_vrf_delete(struct vrf *vrf)
/* release allocated memory */
for (afi = AFI_IP; afi <= AFI_IP6; afi++) {
- void *table_info;
-
for (safi = SAFI_UNICAST; safi <= SAFI_MULTICAST; safi++) {
table = zvrf->table[afi][safi];
if (table) {
- table_info = route_table_get_info(table);
- route_table_finish(table);
- XFREE(MTYPE_RIB_TABLE_INFO, table_info);
+ zebra_router_release_table(zvrf, zvrf->table_id,
+ afi, safi);
+ zvrf->table[afi][safi] = NULL;
}
}