bgpd: Do not send dynamic capability if both peers do not have it exchanged

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2024-01-23 15:17:23 +02:00
parent e74c3b0746
commit 13c5d0e708

View File

@ -1224,7 +1224,7 @@ void bgp_capability_send(struct peer *peer, afi_t afi, safi_t safi,
if (!peer_established(peer->connection))
return;
if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV) &&
if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV) ||
!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV))
return;