]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mptcp: fix delack timer
authorEric Dumazet <edumazet@google.com>
Fri, 19 Nov 2021 14:27:54 +0000 (15:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Nov 2021 14:24:00 +0000 (14:24 +0000)
To compute the rtx timeout schedule_3rdack_retransmission() does multiple
things in the wrong way: srtt_us is measured in usec/8 and the timeout
itself is an absolute value.

Fixes: fa7e6d3bc8596ca2 ("mptcp: Add handling of outgoing MP_JOIN requests")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau>@linux.intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c

index 7c3420afb1a013e585318bf055a3db520bd11202..2e9b73eeeeb58e298b0564f1a7c06f519077965a 100644 (file)
@@ -434,9 +434,10 @@ static void schedule_3rdack_retransmission(struct sock *sk)
 
        /* reschedule with a timeout above RTT, as we must look only for drop */
        if (tp->srtt_us)
-               timeout = tp->srtt_us << 1;
+               timeout = usecs_to_jiffies(tp->srtt_us >> (3 - 1));
        else
                timeout = TCP_TIMEOUT_INIT;
+       timeout += jiffies;
 
        WARN_ON_ONCE(icsk->icsk_ack.pending & ICSK_ACK_TIMER);
        icsk->icsk_ack.pending |= ICSK_ACK_SCHED | ICSK_ACK_TIMER;