]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix transmission timer calculation
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 9 Apr 2020 20:46:02 +0000 (17:46 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 9 Apr 2020 20:46:02 +0000 (17:46 -0300)
According to the RFC 5880 the transmission time should be mandated by
the slowest system.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bfdd/bfd.c

index 1f65231d13a27de34d3b9e5ceb4556d751d13d2d..e16616c3716ac89b2d96e93c3042cd1b42f2b926 100644 (file)
@@ -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);