From 4caf638833c66b292df26735b6051c26e6ca543b Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Thu, 9 Apr 2020 17:46:02 -0300 Subject: [PATCH] bfdd: fix transmission timer calculation According to the RFC 5880 the transmission time should be mandated by the slowest system. Signed-off-by: Rafael Zalamena --- bfdd/bfd.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 1f65231d13..e16616c371 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1032,20 +1032,19 @@ void bs_final_handler(struct bfd_session *bs) } /* - * Calculate detection time based on new timers. + * Calculate transmission time based on new timers. * * Transmission calculation: - * We must respect the RequiredMinRxInterval from the remote - * system: if our desired transmission timer is more than the - * minimum receive rate, then we must lower it to at least the - * minimum receive interval. + * Unless specified by exceptions at the end of Section 6.8.7, the + * transmission time will be determined by the system with the + * slowest rate. * - * RFC 5880, Section 6.8.3. + * RFC 5880, Section 6.8.7. */ if (bs->timers.desired_min_tx > bs->remote_timers.required_min_rx) - bs->xmt_TO = bs->remote_timers.required_min_rx; - else bs->xmt_TO = bs->timers.desired_min_tx; + else + bs->xmt_TO = bs->remote_timers.required_min_rx; /* Apply new transmission timer immediately. */ ptm_bfd_start_xmt_timer(bs, false); -- 2.39.5