From: Philippe Guibert Date: Thu, 19 Jul 2018 15:51:41 +0000 (+0200) Subject: zebra: cancel vrf creation if netns activation failed X-Git-Tag: frr-6.1-dev~160^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F2688%2Fhead;p=mirror%2Ffrr.git zebra: cancel vrf creation if netns activation failed To keep configuration consistent, vrf that have not been able to be associated with netns are removed. Signed-off-by: Philippe Guibert --- diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index 60b72298a1..2dd686fd0d 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -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);