summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_nexthop.c
diff options
context:
space:
mode:
authorKrishnasamy R <krishnasamyr@nvidia.com>2024-11-11 10:59:31 +0100
committerKrishnasamy R <krishnasamyr@nvidia.com>2024-11-11 10:59:31 +0100
commit95c08e082c063374cbc62dea6529c8f54b0722df (patch)
tree435fb0efee45ec0d3a48990e2532308a5184984f /bgpd/bgp_nexthop.c
parentMerge pull request #17362 from raja-rajasekar/rajasekarr/src_proto_for_redist... (diff)
downloadfrr-95c08e082c063374cbc62dea6529c8f54b0722df.tar.xz
frr-95c08e082c063374cbc62dea6529c8f54b0722df.zip
bgpd: fix resolvedPrefix in show nexthop json output
While populating the nexthop info for "show bgp nexthop json", resolvedPrefix is added in parent json object instead of json_nexthop object. This results in displaying wrong resolvedPrefix for nexthops. Fixing the same by adding resolvedPrefix to json_nexthop object, so that the proper resolvedPrefix would be displayed for the respective nexthop Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_nexthop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 401549c4e..357d5292d 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -1001,7 +1001,7 @@ static void bgp_show_nexthop(struct vty *vty, struct bgp *bgp,
if (bnc->is_evpn_gwip_nexthop)
json_object_boolean_true_add(json_nexthop,
"isEvpnGatewayIp");
- json_object_string_addf(json, "resolvedPrefix", "%pFX",
+ json_object_string_addf(json_nexthop, "resolvedPrefix", "%pFX",
&bnc->resolved_prefix);
} else {
vty_out(vty, " %s valid [IGP metric %d], #paths %d",