mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-21 15:32:54 +00:00
Merge pull request #9943 from idryzhov/crash-fixes
a couple of crash fixes after recent interface/vrf rework
This commit is contained in:
commit
95d2bed34b
@ -256,10 +256,8 @@ void vrf_delete(struct vrf *vrf)
|
||||
* the ID mapping. Interfaces assigned to this VRF should've been
|
||||
* removed already as part of the VRF going down.
|
||||
*/
|
||||
if (vrf_is_user_cfged(vrf)) {
|
||||
vrf->ns_ctxt = NULL;
|
||||
if (vrf_is_user_cfged(vrf))
|
||||
return;
|
||||
}
|
||||
|
||||
/* Do not delete the VRF if it has interfaces configured in it. */
|
||||
if (!RB_EMPTY(if_name_head, &vrf->ifaces_by_name))
|
||||
@ -541,9 +539,12 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
|
||||
|
||||
static void vrf_terminate_single(struct vrf *vrf)
|
||||
{
|
||||
int enabled = vrf_is_enabled(vrf);
|
||||
|
||||
/* Clear configured flag and invoke delete. */
|
||||
UNSET_FLAG(vrf->status, VRF_CONFIGURED);
|
||||
if_terminate(vrf);
|
||||
if (enabled)
|
||||
vrf_delete(vrf);
|
||||
}
|
||||
|
||||
|
@ -165,6 +165,7 @@ static int zebra_ns_delete(char *name)
|
||||
/* the deletion order is the same
|
||||
* as the one used when siging signal is received
|
||||
*/
|
||||
vrf->ns_ctxt = NULL;
|
||||
vrf_delete(vrf);
|
||||
if (ns)
|
||||
ns_delete(ns);
|
||||
|
Loading…
Reference in New Issue
Block a user