Re: [PATCH] [net-next, v2] tcp: use monotonic timestamps for PAWS

From: Eric Dumazet
Date: Tue Jun 19 2018 - 19:38:19 EST




On 06/19/2018 05:36 AM, Arnd Bergmann wrote:
> Using get_seconds() for timestamps is deprecated since it can lead
> to overflows on 32-bit systems. While the interface generally doesn't
> overflow until year 2106, the specific implementation of the TCP PAWS
> algorithm breaks in 2038 when the intermediate signed 32-bit timestamps
> overflow.
>
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> v2: use time_before32()/time_after32() everywhere as suggested
> Eric Dumazet


Thanks a lot Arnd.

Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>