summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-08-20 21:36:11 +0200
committerDon Slice <dslice@cumulusnetworks.com>2018-08-20 21:36:11 +0200
commit04c9077f814d0f3c525de59212488a4204bc74b2 (patch)
tree59cee253f2669b5d6cee6c43f257df2e7bf2bd86 /bgpd
parentbgpd: add json output to bgp route-leak show command (diff)
downloadfrr-04c9077f814d0f3c525de59212488a4204bc74b2.tar.xz
frr-04c9077f814d0f3c525de59212488a4204bc74b2.zip
bgpd: fix issues with bgp route-leak json commit
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_vty.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index bfcd28097..984c60200 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -11036,6 +11036,7 @@ 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 {
for (ALL_LIST_ELEMENTS_RO(
bgp->vpn_policy[afi].import_vrf,
@@ -11060,6 +11061,7 @@ 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 {
for (ALL_LIST_ELEMENTS_RO(
bgp->vpn_policy[afi].export_vrf,
@@ -11125,7 +11127,7 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
afi_safi_print(afi, safi));
else {
vty_out(vty,
- "This VRF is exporting %s routes to the ollowing VRFs:\n",
+ "This VRF is exporting %s routes to the following VRFs:\n",
afi_safi_print(afi, safi));
for (ALL_LIST_ELEMENTS_RO(
@@ -11142,6 +11144,7 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
bgp->vpn_policy[afi].rtlist[dir],
ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
vty_out(vty, "Export RT: %s\n", ecom_str);
+ XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
}
}
@@ -11150,8 +11153,8 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
/* "show [ip] bgp route-leak" command. */
DEFUN (show_ip_bgp_route_leak,
-show_ip_bgp_route_leak_cmd,
-"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] route-leak [json]",
+ show_ip_bgp_route_leak_cmd,
+ "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] route-leak [json]",
SHOW_STR
IP_STR
BGP_STR