forked from Mirror/frr
zebra: fix missing node attribute set in ifp
There are cases when switching from one netns to an other one, where the if_table registration by index has not been flushed. This fix mitigates the potential crashes, in case the ifp->node pointer is null, the value is overwritten by the route_node obtained. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
5efbf31054
commit
393ec5424e
|
@ -202,6 +202,7 @@ struct interface *if_link_per_ns(struct zebra_ns *ns, struct interface *ifp)
|
|||
if (rn->info) {
|
||||
ifp = (struct interface *)rn->info;
|
||||
route_unlock_node(rn); /* get */
|
||||
ifp->node = rn;
|
||||
return ifp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue