From: Donald Sharp Date: Thu, 13 Mar 2025 19:19:02 +0000 (-0400) Subject: bgpd: Show bgp shouldn't display peers in groups X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3fb72a03c39c2effd1aa163bff6eabe3081db378;p=mirror%2Ffrr.git bgpd: Show bgp shouldn't display peers in groups The command `show bgp ` has this output: r1# show bgp ipv4 uni 10.0.0.0 BGP routing table entry for 10.0.0.0/32, version 1 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: r1-eth0 r1-eth1 r1-eth2 r1-eth3 .... It specifically states `Advertised to non peer-group peers:` yet the code is not filtering those out. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a7825165e7..eba3a628f2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -12768,6 +12768,9 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp, * though then we must display Advertised to on a path-by-path basis. */ if (!bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) { for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { + if (peer->group) + continue; + if (bgp_adj_out_lookup(peer, dest, 0)) { if (json && !json_adv_to) json_adv_to = json_object_new_object();