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-5.0.2~13^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=34b1bf3a4d60855829fb77181391a78e58dcab55;p=matthieu%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 7ca7b1e383..b41d17df8c 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);