From: Philippe Guibert Date: Fri, 4 May 2018 07:43:52 +0000 (+0200) Subject: zebra: fix missing node attribute set in ifp X-Git-Tag: frr-6.1-dev~453^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=393ec5424e35;p=mirror%2Ffrr.git 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 --- diff --git a/zebra/interface.c b/zebra/interface.c index 6f59a2d399..fc44be34ea 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -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; }