mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 10:49:01 +00:00
bgpd: fix issues with bgp route-leak json commit
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
b46dfd2022
commit
04c9077f81
@ -11036,6 +11036,7 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
|
|||||||
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
|
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
|
||||||
json_object_string_add(json, "importFromVrfs", "none");
|
json_object_string_add(json, "importFromVrfs", "none");
|
||||||
json_object_string_add(json, "importRts", "none");
|
json_object_string_add(json, "importRts", "none");
|
||||||
|
json_object_free(json_import_vrfs);
|
||||||
} else {
|
} else {
|
||||||
for (ALL_LIST_ELEMENTS_RO(
|
for (ALL_LIST_ELEMENTS_RO(
|
||||||
bgp->vpn_policy[afi].import_vrf,
|
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",
|
json_object_string_add(json, "routeDistinguisher",
|
||||||
"none");
|
"none");
|
||||||
json_object_string_add(json, "exportRts", "none");
|
json_object_string_add(json, "exportRts", "none");
|
||||||
|
json_object_free(json_export_vrfs);
|
||||||
} else {
|
} else {
|
||||||
for (ALL_LIST_ELEMENTS_RO(
|
for (ALL_LIST_ELEMENTS_RO(
|
||||||
bgp->vpn_policy[afi].export_vrf,
|
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));
|
afi_safi_print(afi, safi));
|
||||||
else {
|
else {
|
||||||
vty_out(vty,
|
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));
|
afi_safi_print(afi, safi));
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(
|
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],
|
bgp->vpn_policy[afi].rtlist[dir],
|
||||||
ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
|
ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
|
||||||
vty_out(vty, "Export RT: %s\n", ecom_str);
|
vty_out(vty, "Export RT: %s\n", ecom_str);
|
||||||
|
XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user