summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-04-26 11:17:38 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-04-28 15:38:00 -0300
commitef04b19249ec3211614784c3c8791bfabe7d640c (patch)
tree17aa4b80d85a1fa62e3e0777f029d0363fcee8b0 /zebra/interface.c
parent40d3ecc35c73821841b6890322b2e274e2c520cd (diff)
lib: fix segfault on exit caused by interface removal
Add missing bits to properly unlink interface in the if_unlink_per_ns() function. In the long term we should convert if_table to use a more convenient data structure like a red-black tree instead of a routing table. Fixes issue #398. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 1d015e8588..444f3bd587 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -190,6 +190,7 @@ if_unlink_per_ns (struct interface *ifp)
{
ifp->node->info = NULL;
route_unlock_node(ifp->node);
+ ifp->node = NULL;
}
/* Look up an interface by identifier within a NS */