diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-04-16 15:10:17 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-04-18 16:11:51 +0200 |
commit | fc04a6778e3a3d6e0cf13d33fa2f98368a42f1ef (patch) | |
tree | 491a3f1ef9164adeb117a32fd090cbd2947dfa71 /bgpd/bgp_bfd.c | |
parent | bgpd: improve bgp convergence, with bfd up (diff) | |
download | frr-fc04a6778e3a3d6e0cf13d33fa2f98368a42f1ef.tar.xz frr-fc04a6778e3a3d6e0cf13d33fa2f98368a42f1ef.zip |
bgpd: improve reconnection mechanism by cancelling connect timers
if bfd comes back up, and a bgp reconnection is in progress, theorically
it should be necessary to wait for the end of the reconnection process.
however, since that reconnection process may take some time, update the
fsm by cancelling the connect timer. This done, one just have to call
the start timer.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_bfd.c')
-rw-r--r-- | bgpd/bgp_bfd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 965ba868c..dadf124ee 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -282,8 +282,10 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status) } if ((status == BFD_STATUS_UP) && (old_status == BFD_STATUS_DOWN) && peer->status != Established) { - if (!BGP_PEER_START_SUPPRESSED(peer)) + if (!BGP_PEER_START_SUPPRESSED(peer)) { + bgp_fsm_event_update(peer, 1); BGP_EVENT_ADD(peer, BGP_Start); + } } } |