aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 3f227baee4be..2ab6c9c1c53a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1038,7 +1038,13 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt,
1038 return 1; 1038 return 1;
1039 if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)) 1039 if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS))
1040 return 1; 1040 return 1;
1041 1041 /*
1042 * Some OSes send SYN and SYNACK messages with tsval=0 tsecr=0,
1043 * then following tcp messages have valid values. Ignore 0 value,
1044 * or else 'negative' tsval might forbid us to accept their packets.
1045 */
1046 if (!rx_opt->ts_recent)
1047 return 1;
1042 return 0; 1048 return 0;
1043} 1049}
1044 1050