From 150eb73054902511b4be78666ab9895a7509a4ce Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 24 May 2024 08:50:49 +0300 Subject: [PATCH] bgpd: Send a notification if we receive CAPABILITY message if not exepected Signed-off-by: Donatas Abraitis --- bgpd/bgp_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 47aed53bc7..a32ee78861 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -3952,8 +3952,8 @@ int bgp_capability_receive(struct peer_connection *connection, if (bgp_debug_neighbor_events(peer)) zlog_debug("%s rcv CAPABILITY", peer->host); - /* If peer does not have the capability, send notification. */ - if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV)) { + if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV) || + !CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV)) { flog_err(EC_BGP_NO_CAP, "%s [Error] BGP dynamic capability is not enabled", peer->host); -- 2.39.5