[PATCH] lib: Fix RTT estimator invokation in FRCT

  • From: Dimitri Staessens <dimitri@ouroboros.rocks>
  • To: ouroboros@xxxxxxxxxxxxx
  • Date: Sun, 27 Feb 2022 15:29:58 +0100

The notorious off-by-one hit again.

Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
---
 src/lib/frct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/frct.c b/src/lib/frct.c
index 42ce2152..15eb3b96 100644
--- a/src/lib/frct.c
+++ b/src/lib/frct.c
@@ -803,7 +803,7 @@ static void __frcti_rcv(struct frcti *       frcti,
                 if (after(ackno, frcti->snd_cr.lwe))
                         frcti->snd_cr.lwe = ackno;
 
-                if (frcti->probe && after(ackno, frcti->rttseq)) {
+                if (frcti->probe && !before(frcti->rttseq, ackno)) {
                         rtt_estimator(frcti, ts_diff_ns(&frcti->t_probe, 
&now));
                         frcti->probe = false;
                 }
-- 
2.35.1


Other related posts:

  • » [PATCH] lib: Fix RTT estimator invokation in FRCT - Dimitri Staessens