Skip to content

Commit

Permalink
Merge pull request #2720 from pguibert6WIND/misc_vrf_fix
Browse files Browse the repository at this point in the history
Misc vrf fix
  • Loading branch information
rwestphal committed Jul 26, 2018
2 parents 9b4a116 + 34b1bf3 commit ecd647e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zebra/zebra_netns_notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -103,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);
Expand Down

0 comments on commit ecd647e

Please sign in to comment.