From 3098772467ad8a46a8f35cdd4e502806740b2064 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Fri, 21 Apr 2023 11:59:33 +0200 Subject: [PATCH] bgpd: do not display vty output headers for link-state prefixes When displaying the link-state prefixes with "show bgp link-state link-state" command, the following output headers are not needed: > Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, > i internal, r RIB-failure, S Stale, R Removed > Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self > Origin codes: i - IGP, e - EGP, ? - incomplete > RPKI validation codes: V valid, I invalid, N Not found Do not display these headers for link-state SAFI. Signed-off-by: Louis Scalbert --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 0171f991c5..8bfb19a64f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11419,7 +11419,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, vty_out(vty, ASN_FORMAT(bgp->asnotation), &bgp->as); vty_out(vty, "\n"); - if (!detail_routes) { + if (!detail_routes && safi != SAFI_LINKSTATE) { vty_out(vty, BGP_SHOW_SCODE_HEADER); vty_out(vty, BGP_SHOW_NCODE_HEADER); vty_out(vty, BGP_SHOW_OCODE_HEADER); -- 2.39.5