diff options
| -rw-r--r-- | bgpd/bgp_bfd.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_bfd.h | 3 | ||||
| -rw-r--r-- | bgpd/bgp_zebra.c | 10 |
3 files changed, 14 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index b8b0053695..aeac93e7b3 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -71,7 +71,7 @@ bgp_bfd_peer_group2peer_copy(struct peer *conf, struct peer *peer) /* * bgp_bfd_is_peer_multihop - returns whether BFD peer is multi-hop or single hop. */ -static int +int bgp_bfd_is_peer_multihop(struct peer *peer) { struct bfd_info *bfd_info; diff --git a/bgpd/bgp_bfd.h b/bgpd/bgp_bfd.h index 4e554af696..e872637e3e 100644 --- a/bgpd/bgp_bfd.h +++ b/bgpd/bgp_bfd.h @@ -42,4 +42,7 @@ bgp_bfd_peer_config_write(struct vty *vty, struct peer *peer, char *addr); extern void bgp_bfd_show_info(struct vty *vty, struct peer *peer, u_char use_json, json_object *json_neigh); +extern int +bgp_bfd_is_peer_multihop(struct peer *peer); + #endif /* _QUAGGA_BGP_BFD_H */ diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index b4bac840e3..6e17d778ab 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA. */ #include "bgpd/bgp_mpath.h" #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_nht.h" +#include "bgpd/bgp_bfd.h" /* All information about zebra. */ struct zclient *zclient = NULL; @@ -358,7 +359,16 @@ bgp_interface_down (int command, struct zclient *zclient, zebra_size_t length, 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 != 1) && (peer->gtsm_hops != 1) && + (!peer->bfd_info || bgp_bfd_is_peer_multihop(peer))) +#else + /* Take down directly connected EBGP peers */ if ((peer->ttl != 1) && (peer->gtsm_hops != 1)) +#endif continue; if (ifp == peer->nexthop.ifp) |
