]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: sometimes, it is not possible to assign a NSID to a vrf
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 18 Jul 2018 15:58:45 +0000 (17:58 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 25 Jul 2018 09:34:39 +0000 (11:34 +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 30f850597c65c0b848ceddb96115bf4a4a37a71a..7ca7b1e383111b073f51d2e851b5f15c78012399 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);