diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-05-04 09:43:52 +0200 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-05-12 15:24:46 +0200 |
| commit | 8cfc9c5b3a6051c20f28c9dc01d5ee7264467851 (patch) | |
| tree | 7d7e8b5a6f625f08bb274948646ba81d6d5021b6 | |
| parent | b4d130923622dca9592c67f3f580af0ff5aaf342 (diff) | |
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>
| -rw-r--r-- | zebra/interface.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |
