From 5bb116658881d0b32b29754e0fc7944c245989e9 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Fri, 23 Sep 2022 10:14:02 -0300 Subject: [PATCH] bgpd: Fix bgp no shutdown When leaving the BGP shutdown state we must restart the peer timers otherwise nothing will happen. Signed-off-by: Rafael Zalamena Signed-off-by: Donatas Abraitis --- bgpd/bgpd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 9ea5a92adc..e1395a0eef 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4583,6 +4583,9 @@ void bgp_shutdown_enable(struct bgp *bgp, const char *msg) /* Disable global administrative shutdown of all peers of BGP instance */ void bgp_shutdown_disable(struct bgp *bgp) { + const struct listnode *node; + struct peer *peer; + /* do nothing if not shut down. */ if (!CHECK_FLAG(bgp->flags, BGP_FLAG_SHUTDOWN)) return; @@ -4593,6 +4596,9 @@ void bgp_shutdown_disable(struct bgp *bgp) /* clear the BGP instances shutdown flag */ UNSET_FLAG(bgp->flags, BGP_FLAG_SHUTDOWN); + + for (ALL_LIST_ELEMENTS_RO(bgp->peer, node, peer)) + bgp_timer_set(peer); } /* Change specified peer flag. */ -- 2.39.5