summaryrefslogtreecommitdiff
path: root/bgpd/bgp_bfd.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2020-03-12 14:04:30 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2020-03-13 16:38:33 +0100
commitfe0c4ed7ba11ad8654ab868c4bbf9744f8df4db6 (patch)
tree9a7bf5579d88d45f9143ea75cd0ddb047849d815 /bgpd/bgp_bfd.h
parent0886f49ea90fa61aed9cda273386401e0b3c7ecf (diff)
bgpd: reset bfd session when bgp comes up
This scenario has been seen against microtik virtual machine with bfd enabled. When remote microtik bgp reestablishes the bgp session after a bgp reset, the bgp establishment comes first, then bfd is initialising. The second point is true for microtik, but not for frrouting, as the frrouting, when receiving bfd down messages, is not at init state. Actually, bfd state is up, and sees the first bfd down packet from bfd as an issue. Consequently, the BGP session is cleared. The fix consists in resetting the BFD session, only if bfd status is considered as up, once BGP comes up. That permits to align state machines of both local and remote bfd. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_bfd.h')
-rw-r--r--bgpd/bgp_bfd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_bfd.h b/bgpd/bgp_bfd.h
index caa5651e3a..b96ebb6c96 100644
--- a/bgpd/bgp_bfd.h
+++ b/bgpd/bgp_bfd.h
@@ -31,6 +31,8 @@ extern void bgp_bfd_register_peer(struct peer *peer);
extern void bgp_bfd_deregister_peer(struct peer *peer);
+extern void bgp_bfd_reset_peer(struct peer *peer);
+
extern void bgp_bfd_peer_config_write(struct vty *vty, struct peer *peer,
char *addr);