From 97061d1f43d8942676543890405321a55be857c3 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 25 Nov 2024 22:47:21 +0100 Subject: [PATCH] bgpd: fix version attribute is an int, not a string The json display of the version attribute is originally an integer. It has changed, most probably mistakenly. > { > "vrfId": 7, > "vrfName": "vrf1", > "tableVersion": 3, > "routerId": "192.0.2.1", > "defaultLocPrf": 100, > "localAS": 65500, > "routes": { > "172.31.0.1/32": { > "prefix": "172.31.0.1/32", > "version": "1", <--- int or string ?? Let us fix it, by using the integer display instead. Fixes: f9f2d188e398 ("bgpd: fix 'json detail' output structure") Signed-off-by: Philippe Guibert (cherry picked from commit c5d7815cccb92c192ca6b752843b8b827a607b53) # Conflicts: # bgpd/bgp_route.c --- bgpd/bgp_route.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index b6cc5ba4b18f..4bf80e7429a9 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11817,8 +11817,12 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp, } else { if (incremental_print) { vty_out(vty, "\"prefix\": \"%pFX\",\n", p); +<<<<<<< HEAD vty_out(vty, "\"version\": \"%" PRIu64 "\",\n", dest->version); +======= + vty_out(vty, "\"version\": %" PRIu64 ",", dest->version); +>>>>>>> c5d7815ccc (bgpd: fix version attribute is an int, not a string) } else { json_object_string_addf(json, "prefix", "%pFX", p);