Merge pull request #4145 from pguibert6WIND/bfd_converge_up

BFD speed convergence up
This commit is contained in:
Russ White 2019-04-25 18:44:50 -04:00 committed by GitHub
commit 8bc1eeff7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -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);
}
}
}
/*

View File

@ -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 *);

View File

@ -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);

View File

@ -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);
}