diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 1c2ad7fc73..cdf6748f53 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10830,9 +10830,17 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, flap_route_vty_out(vty, dest_p, pi, display, AFI_IP, safi, use_json, json_paths); - else - route_vty_out(vty, dest_p, pi, display, safi, - json_paths, wide); + else { + if (CHECK_FLAG(show_flags, BGP_SHOW_OPT_DETAIL)) + route_vty_out_detail( + vty, bgp, dest, pi, + family2afi(dest_p->family), + safi, RPKI_NOT_BEING_USED, + json_paths); + else + route_vty_out(vty, dest_p, pi, display, + safi, json_paths, wide); + } display++; } @@ -11905,7 +11913,7 @@ DEFPY (show_ip_bgp_json, |route-filter-translated-v4] [exact-match]\ |rpki \ |version (1-4294967295)\ - ] [json$uj | wide$wide]", + ] [json$uj [detail$detail] | wide$wide]", SHOW_STR IP_STR BGP_STR @@ -11941,6 +11949,7 @@ DEFPY (show_ip_bgp_json, "Display prefixes with matching version numbers\n" "Version number and above\n" JSON_STR + "Display detailed version of JSON output\n" "Increase table width for longer prefixes\n") { afi_t afi = AFI_IP6; @@ -11960,6 +11969,9 @@ DEFPY (show_ip_bgp_json, SET_FLAG(show_flags, BGP_SHOW_OPT_JSON); } + if (detail) + SET_FLAG(show_flags, BGP_SHOW_OPT_DETAIL); + /* [ [all]] */ if (all) { SET_FLAG(show_flags, BGP_SHOW_OPT_AFI_ALL); diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 1bf5dcf186..1de453b3c5 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -586,6 +586,7 @@ DECLARE_HOOK(bgp_process, #define BGP_SHOW_OPT_AFI_IP6 (1 << 4) #define BGP_SHOW_OPT_ESTABLISHED (1 << 5) #define BGP_SHOW_OPT_FAILED (1 << 6) +#define BGP_SHOW_OPT_DETAIL (1 << 7) /* Prototypes. */ extern void bgp_rib_remove(struct bgp_dest *dest, struct bgp_path_info *pi,