summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-01-14 17:57:45 +0100
committerDonatas Abraitis <donatas@opensourcerouting.org>2025-01-14 21:46:53 +0100
commitd60320c6d27e476f9e351bc5f1470197fa46623b (patch)
tree3bb37bd4a35b6fc026bd814d3224d818c795e121 /bgpd/bgpd.c
parenttests: Check if ENHE capability can be handled dynamically (diff)
downloadfrr-d60320c6d27e476f9e351bc5f1470197fa46623b.tar.xz
frr-d60320c6d27e476f9e351bc5f1470197fa46623b.zip
bgpd: Handle ENHE capability via dynamic capability
FRR supports dynamic capability which is useful to exchange the capabilities without tearing down the session. ENHE capability was missed to be included handling via dynamic capability. Let's add it too. This was missed and asked in Slack that it would be useful. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--bgpd/bgpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 02333db1c..977980dc4 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4953,6 +4953,10 @@ static void peer_flag_modify_action(struct peer *peer, uint64_t flag)
peer->v_start = BGP_INIT_START_TIMER;
BGP_EVENT_ADD(peer->connection, BGP_Stop);
}
+ } else if (CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV) &&
+ CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV) &&
+ flag == PEER_FLAG_CAPABILITY_ENHE) {
+ peer->last_reset = PEER_DOWN_CAPABILITY_CHANGE;
} else if (!peer_notify_config_change(peer->connection))
bgp_session_reset(peer);
}