summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_netns_notify.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-12-18 18:00:31 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-01-04 09:55:31 +0100
commitf245bcaebbd499f888c8f9355c73f8d78fded17f (patch)
tree0545e06c68396ba52ce54078a04e5b2f49bc7e56 /zebra/zebra_netns_notify.c
parentMerge pull request #3561 from opensourcerouting/northbound-freebsd-fix (diff)
downloadfrr-f245bcaebbd499f888c8f9355c73f8d78fded17f.tar.xz
frr-f245bcaebbd499f888c8f9355c73f8d78fded17f.zip
zebra: handle multiple events for netns deletion event
When handling events from /var/run/netns folder, if several netns are removed at the same time, only the first one is deleted in the frr. Fix this behaviour by applying continue in the loop. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/zebra_netns_notify.c')
-rw-r--r--zebra/zebra_netns_notify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c
index a4e102214..ed9f3899d 100644
--- a/zebra/zebra_netns_notify.c
+++ b/zebra/zebra_netns_notify.c
@@ -266,9 +266,10 @@ static int zebra_ns_notify_read(struct thread *t)
break;
}
- if (event->mask & IN_DELETE)
- return zebra_ns_delete(event->name);
-
+ if (event->mask & IN_DELETE) {
+ zebra_ns_delete(event->name);
+ continue;
+ }
netnspath = ns_netns_pathname(NULL, event->name);
if (!netnspath)
continue;