diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-09 23:08:41 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-09 23:08:41 +0300 | 
| commit | 1e9bae0331bfe8a2a4a8e822a4ef0eb33a71c1e3 (patch) | |
| tree | 53a7e7f55b3599e0b1569bcdbe64604c252fd8f7 /bfdd/bfd.c | |
| parent | 955ee648f45dcbac19ddf8ef4b164e3c385efdc3 (diff) | |
bfdd: fix detect timeout
RFC 5880 Section 6.8.4:
In Asynchronous mode, the Detection Time calculated in the local
system is equal to the value of Detect Mult received from the remote
system, multiplied by the agreed transmit interval of the remote
system (the greater of bfd.RequiredMinRxInterval and the last
received Desired Min TX Interval).
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bfdd/bfd.c')
| -rw-r--r-- | bfdd/bfd.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 3e45bf0e04..499e54603f 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1252,12 +1252,12 @@ void bs_final_handler(struct bfd_session *bs)  	 * TODO: support sending/counting more packets inside detection  	 * timeout.  	 */ -	if (bs->remote_timers.required_min_rx > bs->timers.desired_min_tx) +	if (bs->timers.required_min_rx > bs->remote_timers.desired_min_tx)  		bs->detect_TO = bs->remote_detect_mult -				* bs->remote_timers.required_min_rx; +				* bs->timers.required_min_rx;  	else  		bs->detect_TO = bs->remote_detect_mult -				* bs->timers.desired_min_tx; +				* bs->remote_timers.desired_min_tx;  	/* Apply new receive timer immediately. */  	bfd_recvtimer_update(bs);  | 
