mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 13:18:52 +00:00
Merge pull request #13012 from donaldsharp/hold_time_reset
bgpd: Always restart timer from scratch in OpenConfirm/Established
This commit is contained in:
commit
6c634d2912
@ -435,12 +435,16 @@ void bgp_timer_set(struct peer *peer)
|
|||||||
THREAD_OFF(peer->t_start);
|
THREAD_OFF(peer->t_start);
|
||||||
THREAD_OFF(peer->t_connect);
|
THREAD_OFF(peer->t_connect);
|
||||||
|
|
||||||
/* If the negotiated Hold Time value is zero, then the Hold Time
|
/*
|
||||||
timer and KeepAlive timers are not started. */
|
* If the negotiated Hold Time value is zero, then the Hold Time
|
||||||
if (peer->v_holdtime == 0) {
|
* timer and KeepAlive timers are not started.
|
||||||
|
* Additionally if a different hold timer has been negotiated
|
||||||
|
* than we must stop then start the timer again
|
||||||
|
*/
|
||||||
THREAD_OFF(peer->t_holdtime);
|
THREAD_OFF(peer->t_holdtime);
|
||||||
|
if (peer->v_holdtime == 0)
|
||||||
bgp_keepalives_off(peer);
|
bgp_keepalives_off(peer);
|
||||||
} else {
|
else {
|
||||||
BGP_TIMER_ON(peer->t_holdtime, bgp_holdtime_timer,
|
BGP_TIMER_ON(peer->t_holdtime, bgp_holdtime_timer,
|
||||||
peer->v_holdtime);
|
peer->v_holdtime);
|
||||||
bgp_keepalives_on(peer);
|
bgp_keepalives_on(peer);
|
||||||
@ -456,12 +460,16 @@ void bgp_timer_set(struct peer *peer)
|
|||||||
THREAD_OFF(peer->t_connect);
|
THREAD_OFF(peer->t_connect);
|
||||||
THREAD_OFF(peer->t_delayopen);
|
THREAD_OFF(peer->t_delayopen);
|
||||||
|
|
||||||
/* Same as OpenConfirm, if holdtime is zero then both holdtime
|
/*
|
||||||
and keepalive must be turned off. */
|
* Same as OpenConfirm, if holdtime is zero then both holdtime
|
||||||
if (peer->v_holdtime == 0) {
|
* and keepalive must be turned off.
|
||||||
|
* Additionally if a different hold timer has been negotiated
|
||||||
|
* then we must stop then start the timer again
|
||||||
|
*/
|
||||||
THREAD_OFF(peer->t_holdtime);
|
THREAD_OFF(peer->t_holdtime);
|
||||||
|
if (peer->v_holdtime == 0)
|
||||||
bgp_keepalives_off(peer);
|
bgp_keepalives_off(peer);
|
||||||
} else {
|
else {
|
||||||
BGP_TIMER_ON(peer->t_holdtime, bgp_holdtime_timer,
|
BGP_TIMER_ON(peer->t_holdtime, bgp_holdtime_timer,
|
||||||
peer->v_holdtime);
|
peer->v_holdtime);
|
||||||
bgp_keepalives_on(peer);
|
bgp_keepalives_on(peer);
|
||||||
|
Loading…
Reference in New Issue
Block a user