From 13c5d0e708013b88341cd5246b1e7f0293e002c4 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 23 Jan 2024 15:17:23 +0200 Subject: [PATCH] bgpd: Do not send dynamic capability if both peers do not have it exchanged Signed-off-by: Donatas Abraitis --- bgpd/bgp_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 9d484d901a..203201d2c1 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -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; -- 2.39.5