]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: sometimes, it is not possible to assign a NSID to a vrf 2678/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 18 Jul 2018 15:58:45 +0000 (17:58 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 18 Jul 2018 16:02:46 +0000 (18:02 +0200)
This test case happens in scenarios with mininet, where external netns
may be impossible for the local instance to be modified. The error is
ignored and the netns parsed is ignored too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra/zebra_netns_notify.c

index d0ea661403d0bdc0ffecce3289ec8a4d3ac540ae..60b72298a145094452d03ef0cb64a9e247ae7e99 100644 (file)
@@ -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);