From 480c6f233d30ded0958673b106fda5ba5e60bd99 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Thu, 16 Dec 2010 14:08:34 -0800 Subject: [PATCH] --- yaml --- r: 225189 b: refs/heads/master c: bc2ce894e113ed95b92541134b002fdc641e8080 h: refs/heads/master i: 225187: 290c347db8483f204f6614c240be6a46e8329921 v: v3 --- [refs] | 2 +- trunk/include/net/tcp.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a7d955356a5c..873b99cfca7e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 443457242beb6716b43db4d62fe148eab5515505 +refs/heads/master: bc2ce894e113ed95b92541134b002fdc641e8080 diff --git a/trunk/include/net/tcp.h b/trunk/include/net/tcp.h index 3f227baee4be..2ab6c9c1c53a 100644 --- a/trunk/include/net/tcp.h +++ b/trunk/include/net/tcp.h @@ -1038,7 +1038,13 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt, return 1; if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)) return 1; - + /* + * Some OSes send SYN and SYNACK messages with tsval=0 tsecr=0, + * then following tcp messages have valid values. Ignore 0 value, + * or else 'negative' tsval might forbid us to accept their packets. + */ + if (!rx_opt->ts_recent) + return 1; return 0; }