Merge pull request #18376 from pguibert6WIND/show_bgp_neighbor_counter_tx

bgpd: fix add prefix sent in 'show bgp neighbor'
This commit is contained in:
Donatas Abraitis 2025-04-10 19:38:59 +03:00 committed by GitHub
commit dc37bff8c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14088,9 +14088,14 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
? "Advertise"
: "Withdraw");
/* Receive prefix count */
vty_out(vty, " %u accepted prefixes\n",
p->pcount[afi][safi]);
/* Receive and sent prefix count, if available */
paf = peer_af_find(p, afi, safi);
if (paf && PAF_SUBGRP(paf))
vty_out(vty, " %u accepted, %u sent prefixes\n",
p->pcount[afi][safi], PAF_SUBGRP(paf)->scount);
else
vty_out(vty, " %u accepted prefixes\n",
p->pcount[afi][safi]);
/* maximum-prefix-out */
if (CHECK_FLAG(p->af_flags[afi][safi],