]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: cancel vrf creation if netns activation failed 2688/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 19 Jul 2018 15:51:41 +0000 (17:51 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 19 Jul 2018 15:52:29 +0000 (17:52 +0200)
To keep configuration consistent, vrf that have not been able to be
associated with netns are removed.

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

index 60b72298a145094452d03ef0cb64a9e247ae7e99..2dd686fd0dbe2bdb3f96d44f82f6b2ed6f4f97a8 100644 (file)
@@ -105,6 +105,7 @@ static void zebra_ns_notify_create_context_from_entry_name(const char *name)
        if (ret != CMD_SUCCESS) {
                zlog_warn("NS notify : failed to create NS %s", netnspath);
                ns_map_nsid_with_external(ns_id, false);
+               vrf_delete(vrf);
                return;
        }
        zlog_info("NS notify : created VRF %s NS %s", name, netnspath);