Skip to content
Permalink
Browse files

bgpd: fix additional issue with bgp route-leak json commit

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
  • Loading branch information...
dslicenc committed Aug 20, 2018
1 parent 04c9077 commit 6ce24e5247ee5645eba3acbbc77d44b625b82a49
Showing with 4 additions and 4 deletions.
  1. +4 −4 bgpd/bgp_vty.c
@@ -11010,8 +11010,6 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
json_object *json_export_vrfs = NULL;

json = json_object_new_object();
json_import_vrfs = json_object_new_array();
json_export_vrfs = json_object_new_array();

/* Provide context for the block */
json_object_string_add(json, "vrf", name ? name : "default");
@@ -11036,8 +11034,9 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
json_object_string_add(json, "importFromVrfs", "none");
json_object_string_add(json, "importRts", "none");
json_object_free(json_import_vrfs);
} else {
json_import_vrfs = json_object_new_array();

for (ALL_LIST_ELEMENTS_RO(
bgp->vpn_policy[afi].import_vrf,
node, vname))
@@ -11061,8 +11060,9 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
json_object_string_add(json, "routeDistinguisher",
"none");
json_object_string_add(json, "exportRts", "none");
json_object_free(json_export_vrfs);
} else {
json_export_vrfs = json_object_new_array();

for (ALL_LIST_ELEMENTS_RO(
bgp->vpn_policy[afi].export_vrf,
node, vname))

0 comments on commit 6ce24e5

Please sign in to comment.
You can’t perform that action at this time.