lib, zebra: Preserve user-configured VRF on netns deletion

Don't clear VRF's user-configured flag when netns is deleted.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
This commit is contained in:
Xiao Liang 2021-07-30 13:00:06 +08:00
parent 31a8ea0f5f
commit 6910315f6f
2 changed files with 1 additions and 2 deletions

View File

@ -287,6 +287,7 @@ void vrf_delete(struct vrf *vrf)
RB_REMOVE(vrf_id_head, &vrfs_by_id, vrf);
vrf->vrf_id = VRF_UNKNOWN;
}
vrf->ns_ctxt = NULL;
return;
}

View File

@ -149,8 +149,6 @@ static int zebra_ns_delete(char *name)
"NS notify : no VRF found using NS %s", name);
return 0;
}
/* Clear configured flag and invoke delete. */
UNSET_FLAG(vrf->status, VRF_CONFIGURED);
ns = (struct ns *)vrf->ns_ctxt;
/* the deletion order is the same
* as the one used when siging signal is received