]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: remove cumulus specific code
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 26 Feb 2021 19:51:00 +0000 (16:51 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 23 Mar 2021 15:40:10 +0000 (12:40 -0300)
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 <rzalamena@opensourcerouting.org>
bgpd/bgp_zebra.c

index afdd5123fb5a3255245e919677594d59586df632..0a12e719ced0c2e0ffca1fd198d9a8ed7b8256ad 100644 (file)
@@ -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) {