]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: handle multiple events for netns deletion event
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 18 Dec 2018 17:00:31 +0000 (18:00 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 4 Jan 2019 08:55:31 +0000 (09:55 +0100)
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>
zebra/zebra_netns_notify.c

index a4e10221482012a9204287860f7c3a92a525c57d..ed9f3899d4e5a66f604b21fcf09d646453d5e383 100644 (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;