diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-12-16 21:36:49 -0500 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-12-18 17:57:53 +0100 |
| commit | 01b4cb3ed6181d7200f66e0187b1e5c5db6c0e5a (patch) | |
| tree | 49f52a0590c576e6d4aea6e8f77bd3b14856c10a /zebra/zebra_netns_notify.c | |
| parent | 8c7de11843fad704a70729358ab98cca8a3c8599 (diff) | |
zebra: Allow ns delete to happen after under/over flow checks
Allow the ns deletion event to happen *after* the data validity
checks.
Please note this probably still leaves a weird hole if we receive
multiple namespace events ( as the for loop implies ). We will
stop handling anything after a namespace deletion notification.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_netns_notify.c')
| -rw-r--r-- | zebra/zebra_netns_notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index 3f69b98413..a4e1022148 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -252,8 +252,6 @@ static int zebra_ns_notify_read(struct thread *t) if (!(event->mask & (IN_CREATE | IN_DELETE))) continue; - if (event->mask & IN_DELETE) - return zebra_ns_delete(event->name); if (offsetof(struct inotify_event, name) + event->len >= sizeof(buf)) { @@ -268,6 +266,9 @@ static int zebra_ns_notify_read(struct thread *t) break; } + if (event->mask & IN_DELETE) + return zebra_ns_delete(event->name); + netnspath = ns_netns_pathname(NULL, event->name); if (!netnspath) continue; |
