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>
This commit is contained in:
Philippe Guibert 2018-12-18 18:00:31 +01:00
parent c05f659a58
commit f245bcaebb

View File

@ -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;