From 50bd8995d4595048844905bdeaf7d14252ec652a Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Fri, 26 Feb 2021 16:51:00 -0300 Subject: [PATCH] bgpd: remove cumulus specific code The BFD function `bgp_bfd_is_peer_multihop` will no longer exist and now both code paths are equal. Longer explanation: Cumulus was previously using the BFD function to help determine whether a peer is multi hop or not, because there is a configuration to set BFD to use single or multi hop. Current BFD code can automatically pick between single/multi hop by using the protocol information and so it is a good idea to have that tested/used than relying on yet another duplicated information. (BFD extracts the TTL information from protocol and selects single/multi hop based on that) Signed-off-by: Rafael Zalamena --- bgpd/bgp_zebra.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index afdd5123fb..0a12e719ce 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -283,20 +283,9 @@ static int bgp_ifp_down(struct interface *ifp) if (!CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) { for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { -#if defined(HAVE_CUMULUS) - /* Take down directly connected EBGP peers as well as - * 1-hop BFD - * tracked (directly connected) IBGP peers. - */ - if ((peer->ttl != BGP_DEFAULT_TTL) - && (peer->gtsm_hops != BGP_GTSM_HOPS_CONNECTED) - && (!peer->bfd_info - || bgp_bfd_is_peer_multihop(peer))) -#else - /* Take down directly connected EBGP peers */ + /* Take down directly connected peers. */ if ((peer->ttl != BGP_DEFAULT_TTL) && (peer->gtsm_hops != BGP_GTSM_HOPS_CONNECTED)) -#endif continue; if (ifp == peer->nexthop.ifp) { -- 2.39.5