summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bfd.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-04-15 10:31:10 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-04-18 16:11:51 +0200
commit5172851960576252a9a427b8bcec12b3595561ef (patch)
tree9bc4640956db83d05fccb301adba4b1616e3734f /bgpd/bgp_bfd.c
parent.gitignore: ignore core dumps (diff)
downloadfrr-5172851960576252a9a427b8bcec12b3595561ef.tar.xz
frr-5172851960576252a9a427b8bcec12b3595561ef.zip
bgpd: improve bgp convergence, with bfd up
Bgp periodically tries to reconnect, while the connection is down. When bfd event comes up, BGP is not aware that bfd connection is up, then BGP can not adapt its reconnection timer. The modification is here to force BGP to restart, when BFD event comes up, and BGP has not yet established. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_bfd.c')
-rw-r--r--bgpd/bgp_bfd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 663bc4894..965ba868c 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -280,6 +280,11 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status)
peer->last_reset = PEER_DOWN_BFD_DOWN;
BGP_EVENT_ADD(peer, BGP_Stop);
}
+ if ((status == BFD_STATUS_UP) && (old_status == BFD_STATUS_DOWN)
+ && peer->status != Established) {
+ if (!BGP_PEER_START_SUPPRESSED(peer))
+ BGP_EVENT_ADD(peer, BGP_Start);
+ }
}
/*