summaryrefslogtreecommitdiff
path: root/zebra/zebra_netns_notify.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-07-18 15:36:53 -0400
committerGitHub <noreply@github.com>2018-07-18 15:36:53 -0400
commit06a5959f10f30740dcdf7d09a9c77f1504fc3328 (patch)
treef77f0dee3b198ca5d0070dd37481e07fe7d0f09c /zebra/zebra_netns_notify.c
parentbf032674956aa25983825c3c70c646b82bcf581a (diff)
parent85a0edcab2e0b9a1b2b4491f0d2b1862996728cc (diff)
Merge pull request #2678 from pguibert6WIND/sanity_netns
zebra: sometimes, it is not possible to assign a NSID to a vrf
Diffstat (limited to 'zebra/zebra_netns_notify.c')
-rw-r--r--zebra/zebra_netns_notify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c
index d0ea661403..60b72298a1 100644
--- a/zebra/zebra_netns_notify.c
+++ b/zebra/zebra_netns_notify.c
@@ -80,6 +80,8 @@ static void zebra_ns_notify_create_context_from_entry_name(const char *name)
ns_id = zebra_ns_id_get(netnspath);
if (zserv_privs.change(ZPRIVS_LOWER))
zlog_err("Can't lower privileges");
+ if (ns_id == NS_UNKNOWN)
+ return;
ns_id_external = ns_map_nsid_with_external(ns_id, true);
/* if VRF with NS ID already present */
vrf = vrf_lookup_by_id((vrf_id_t)ns_id_external);