diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index df89a566a5a1..52e3ae603ca9 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1299,10 +1299,8 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1299 | 1299 | ||
1300 | tcp_parse_options(skb, &tmp_opt, 0); | 1300 | tcp_parse_options(skb, &tmp_opt, 0); |
1301 | 1301 | ||
1302 | if (want_cookie) { | 1302 | if (want_cookie && !tmp_opt.saw_tstamp) |
1303 | tcp_clear_options(&tmp_opt); | 1303 | tcp_clear_options(&tmp_opt); |
1304 | tmp_opt.saw_tstamp = 0; | ||
1305 | } | ||
1306 | 1304 | ||
1307 | if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) { | 1305 | if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) { |
1308 | /* Some OSes (unknown ones, but I see them on web server, which | 1306 | /* Some OSes (unknown ones, but I see them on web server, which |
@@ -1330,6 +1328,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1330 | if (want_cookie) { | 1328 | if (want_cookie) { |
1331 | #ifdef CONFIG_SYN_COOKIES | 1329 | #ifdef CONFIG_SYN_COOKIES |
1332 | syn_flood_warning(skb); | 1330 | syn_flood_warning(skb); |
1331 | req->cookie_ts = tmp_opt.tstamp_ok; | ||
1333 | #endif | 1332 | #endif |
1334 | isn = cookie_v4_init_sequence(sk, skb, &req->mss); | 1333 | isn = cookie_v4_init_sequence(sk, skb, &req->mss); |
1335 | } else if (!isn) { | 1334 | } else if (!isn) { |