mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 08:23:56 +00:00
ospf6d: unlink router from vrf on deletion
Otherwise `ospf6_lookup_by_vrf_id` returns stale pointer. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
67bde476b5
commit
92699b9bbe
@ -413,6 +413,7 @@ void ospf6_delete(struct ospf6 *o)
|
||||
{
|
||||
struct listnode *node, *nnode;
|
||||
struct ospf6_area *oa;
|
||||
struct vrf *vrf;
|
||||
|
||||
QOBJ_UNREG(o);
|
||||
|
||||
@ -442,6 +443,12 @@ void ospf6_delete(struct ospf6 *o)
|
||||
ospf6_distance_reset(o);
|
||||
route_table_finish(o->distance_table);
|
||||
|
||||
if (o->vrf_id != VRF_UNKNOWN) {
|
||||
vrf = vrf_lookup_by_id(o->vrf_id);
|
||||
if (vrf)
|
||||
ospf6_vrf_unlink(o, vrf);
|
||||
}
|
||||
|
||||
XFREE(MTYPE_OSPF6_TOP, o->name);
|
||||
XFREE(MTYPE_OSPF6_TOP, o);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user