summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-03-09 21:08:41 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2021-03-09 21:08:41 +0100
commit1e9bae0331bfe8a2a4a8e822a4ef0eb33a71c1e3 (patch)
tree53a7e7f55b3599e0b1569bcdbe64604c252fd8f7 /bfdd
parentMerge pull request #8158 from idryzhov/staticd-fix-blackhole (diff)
downloadfrr-1e9bae0331bfe8a2a4a8e822a4ef0eb33a71c1e3.tar.xz
frr-1e9bae0331bfe8a2a4a8e822a4ef0eb33a71c1e3.zip
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')
-rw-r--r--bfdd/bfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index 3e45bf0e0..499e54603 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);