diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e353c1bdfad5..328434d2ef3d 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11259,6 +11259,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, bool wide = CHECK_FLAG(show_flags, BGP_SHOW_OPT_WIDE); bool all = CHECK_FLAG(show_flags, BGP_SHOW_OPT_AFI_ALL); bool detail_json = CHECK_FLAG(show_flags, BGP_SHOW_OPT_JSON_DETAIL); + bool detail_routes = CHECK_FLAG(show_flags, BGP_SHOW_OPT_ROUTES_DETAIL); if (output_cum && *output_cum != 0) header = false; @@ -11555,7 +11556,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, vty_out(vty, "Default local pref %u, ", bgp->default_local_pref); vty_out(vty, "local AS %u\n", bgp->as); - if (!detail_json) { + if (!detail_routes) { vty_out(vty, BGP_SHOW_SCODE_HEADER); vty_out(vty, BGP_SHOW_NCODE_HEADER); vty_out(vty, BGP_SHOW_OCODE_HEADER); @@ -11567,7 +11568,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, else if (type == bgp_show_type_flap_statistics || type == bgp_show_type_flap_neighbor) vty_out(vty, BGP_SHOW_FLAP_HEADER); - else if (!detail_json) + else if (!detail_routes) vty_out(vty, (wide ? BGP_SHOW_HEADER_WIDE : BGP_SHOW_HEADER)); header = false; @@ -11610,7 +11611,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, AFI_IP, safi, use_json, json_paths); else { - if (detail_json) { + if (detail_routes) { const struct prefix_rd *prd; prd = bgp_rd_from_dest(dest, safi); @@ -12676,6 +12677,7 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd, |A.B.C.D/M longer-prefixes\ |X:X::X:X/M longer-prefixes\ |optimal-route-reflection [WORD$orr_group_name]\ + |detail-routes$detail_routes\ ] [json$uj [detail$detail_json] | wide$wide]", SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_HELP_STR BGP_SAFI_WITH_LABEL_HELP_STR @@ -12726,6 +12728,7 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd, "Display route and more specific routes\n" "Display Optimal Route Reflection RR Clients\n" "ORR Group name\n" + "Display detailed version of all routes\n" JSON_STR "Display detailed version of JSON output\n" "Increase table width for longer prefixes\n") @@ -12752,6 +12755,9 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd, if (detail_json) SET_FLAG(show_flags, BGP_SHOW_OPT_JSON_DETAIL); + if (detail_routes) + SET_FLAG(show_flags, BGP_SHOW_OPT_ROUTES_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 2b91c048cb08..63dd69f80592 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -665,6 +665,7 @@ DECLARE_HOOK(bgp_process, #define BGP_SHOW_OPT_FAILED (1 << 6) #define BGP_SHOW_OPT_JSON_DETAIL (1 << 7) #define BGP_SHOW_OPT_TERSE (1 << 8) +#define BGP_SHOW_OPT_ROUTES_DETAIL (1 << 9) /* Prototypes. */ extern void bgp_rib_remove(struct bgp_dest *dest, struct bgp_path_info *pi,