summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2019-04-25 18:44:50 -0400
committerGitHub <noreply@github.com>2019-04-25 18:44:50 -0400
commit8bc1eeff7db71ea3f06edb29c5dbd6f2e0949ae6 (patch)
treea72456ee33fbe80090993f217e8e8cc58d683e46 /bgpd
parent798b3c3469d2c63bda01ca730af41949c8974242 (diff)
parentfc04a6778e3a3d6e0cf13d33fa2f98368a42f1ef (diff)
Merge pull request #4145 from pguibert6WIND/bfd_converge_up
BFD speed convergence up
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_bfd.c7
-rw-r--r--bgpd/bgp_fsm.c3
-rw-r--r--bgpd/bgp_fsm.h2
-rw-r--r--bgpd/bgp_nht.c2
4 files changed, 10 insertions, 4 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 663bc4894a..dadf124eec 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -280,6 +280,13 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status)
peer->last_reset = PEER_DOWN_BFD_DOWN;
BGP_EVENT_ADD(peer, BGP_Stop);
}
+ if ((status == BFD_STATUS_UP) && (old_status == BFD_STATUS_DOWN)
+ && peer->status != Established) {
+ if (!BGP_PEER_START_SUPPRESSED(peer)) {
+ bgp_fsm_event_update(peer, 1);
+ BGP_EVENT_ADD(peer, BGP_Start);
+ }
+ }
}
/*
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 447d8da613..9e37a60188 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -1754,7 +1754,7 @@ static int bgp_fsm_exeption(struct peer *peer)
return (bgp_stop(peer));
}
-void bgp_fsm_nht_update(struct peer *peer, int valid)
+void bgp_fsm_event_update(struct peer *peer, int valid)
{
if (!peer)
return;
@@ -1788,7 +1788,6 @@ void bgp_fsm_nht_update(struct peer *peer, int valid)
}
}
-
/* Finite State Machine structure */
static const struct {
int (*func)(struct peer *);
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index d021c9884a..3476a3c3a9 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -57,7 +57,7 @@
#define FSM_PEER_TRANSITIONED 3
/* Prototypes. */
-extern void bgp_fsm_nht_update(struct peer *, int valid);
+extern void bgp_fsm_event_update(struct peer *peer, int valid);
extern int bgp_event(struct thread *);
extern int bgp_event_update(struct peer *, int event);
extern int bgp_stop(struct peer *peer);
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 6e85abc8df..7e721db49d 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -793,7 +793,7 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc)
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s: Updating peer (%s) status with NHT",
__FUNCTION__, peer->host);
- bgp_fsm_nht_update(peer, bgp_isvalid_nexthop(bnc));
+ bgp_fsm_event_update(peer, bgp_isvalid_nexthop(bnc));
SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED);
}