]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix bgp no shutdown
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 23 Sep 2022 13:14:02 +0000 (10:14 -0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 17 Feb 2023 21:47:32 +0000 (23:47 +0200)
When leaving the BGP shutdown state we must restart the peer timers
otherwise nothing will happen.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgpd.c

index 9ea5a92adca6afe9532581a73e170cd43d3e4dec..e1395a0eef755838c2a4bfe76f2e97cee74dff6b 100644 (file)
@@ -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. */