summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2025-02-04 10:15:06 -0600
committerGitHub <noreply@github.com>2025-02-04 10:15:06 -0600
commitba0b26427a63ddf2de8e83f9ad6bccb0ff05e1d5 (patch)
tree5ac4728c06680240576f1e34d995e8075683b097
parent5824e1e89d7b7c6df21f9081a274ff4dd756875f (diff)
parent4db6d865b97b19c2ddc1f08a836647443469627e (diff)
Merge pull request #17998 from FRRouting/mergify/bp/stable/10.1/pr-17992
bgpd: fix route-distinguisher in vrf leak json cmd (backport #17992)
-rw-r--r--bgpd/bgp_vty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index d5f16051e8..9dc85e745e 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -16464,9 +16464,9 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
json_object_new_string(vname));
json_object_object_add(json, "exportToVrfs",
json_export_vrfs);
- json_object_string_addf(
- json, "routeDistinguisher", "%s",
- bgp->vpn_policy[afi].tovpn_rd_pretty);
+ json_object_string_addf(json, "routeDistinguisher",
+ BGP_RD_AS_FORMAT(bgp->asnotation),
+ &bgp->vpn_policy[afi].tovpn_rd);
dir = BGP_VPN_POLICY_DIR_TOVPN;
if (bgp->vpn_policy[afi].rtlist[dir]) {
ecom_str = ecommunity_ecom2str(