From 393ec5424e35d1469d6a3c9ac7cd0f38481bb359 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 4 May 2018 09:43:52 +0200 Subject: [PATCH] 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 --- zebra/interface.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.5