summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-06-12 16:59:11 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-06-12 16:59:11 +0200
commitc43ed2e48af8c787a1ebc4b648f844c44032db35 (patch)
tree24e3abff6f724033ab16418961da91ff1ddd6aee /bgpd/bgp_fsm.c
parentKey changes: (diff)
downloadfrr-c43ed2e48af8c787a1ebc4b648f844c44032db35.tar.xz
frr-c43ed2e48af8c787a1ebc4b648f844c44032db35.zip
This patch changes BGP from only listening mode for BFD status updates to interactive mode of dynamically registering/deregistering BFD enabled peers with PTM/BFD through zebra. Peer is registered with BFD when it goes into established state and de-registers when it goes out of establish state.
This patch also adds BFD multihop support for BGP. Whether a peer is multi-hop or single hop is determined internally. All IGP peers are considered as multi-hop peers. EBGP peers are considered as single hop unless configured as multi-hop. BGP BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). router bgp <as-number> neighbor <name/ip-address> bfd <detect mult> <min rx> <min tx> Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 6089cbd94..33c5066cd 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -48,6 +48,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#endif /* HAVE_SNMP */
#include "bgpd/bgp_updgrp.h"
#include "bgpd/bgp_nht.h"
+#include "bgpd/bgp_bfd.h"
/* Definition of display strings corresponding to FSM events. This should be
* kept consistent with the events defined in bgpd.h
@@ -1059,6 +1060,8 @@ bgp_stop (struct peer *peer)
/* Reset peer synctime */
peer->synctime = 0;
+
+ bgp_bfd_deregister_peer(peer);
}
/* Stop read and write threads when exists. */
@@ -1548,6 +1551,7 @@ bgp_establish (struct peer *peer)
peer_delete(peer->doppelganger);
}
+ bgp_bfd_register_peer(peer);
return ret;
}