Merge pull request #2688 from pguibert6WIND/vrf_delete_on_netns_fail

zebra: cancel vrf creation if netns activation failed
This commit is contained in:
Donald Sharp 2018-07-20 01:54:10 -04:00 committed by GitHub
commit dc7f5a78b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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);