Merge pull request #8224 from idryzhov/fix-bfd-detect-to

bfdd: fix detect timeout
This commit is contained in:
Rafael Zalamena 2021-03-10 10:27:00 +00:00 committed by GitHub
commit 1b2e093817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1252,12 +1252,12 @@ void bs_final_handler(struct bfd_session *bs)
* TODO: support sending/counting more packets inside detection * TODO: support sending/counting more packets inside detection
* timeout. * 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->detect_TO = bs->remote_detect_mult
* bs->remote_timers.required_min_rx; * bs->timers.required_min_rx;
else else
bs->detect_TO = bs->remote_detect_mult bs->detect_TO = bs->remote_detect_mult
* bs->timers.desired_min_tx; * bs->remote_timers.desired_min_tx;
/* Apply new receive timer immediately. */ /* Apply new receive timer immediately. */
bfd_recvtimer_update(bs); bfd_recvtimer_update(bs);