diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 9a1a1494b9dd..671c69535671 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -3267,23 +3267,11 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn) | |||
3267 | { | 3267 | { |
3268 | struct tcp_sock *tp = tcp_sk(sk); | 3268 | struct tcp_sock *tp = tcp_sk(sk); |
3269 | struct tcp_fastopen_request *fo = tp->fastopen_req; | 3269 | struct tcp_fastopen_request *fo = tp->fastopen_req; |
3270 | int syn_loss = 0, space, err = 0; | 3270 | int space, err = 0; |
3271 | unsigned long last_syn_loss = 0; | ||
3272 | struct sk_buff *syn_data; | 3271 | struct sk_buff *syn_data; |
3273 | 3272 | ||
3274 | tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ | 3273 | tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ |
3275 | tcp_fastopen_cache_get(sk, &tp->rx_opt.mss_clamp, &fo->cookie, | 3274 | if (!tcp_fastopen_cookie_check(sk, &tp->rx_opt.mss_clamp, &fo->cookie)) |
3276 | &syn_loss, &last_syn_loss); | ||
3277 | /* Recurring FO SYN losses: revert to regular handshake temporarily */ | ||
3278 | if (syn_loss > 1 && | ||
3279 | time_before(jiffies, last_syn_loss + (60*HZ << syn_loss))) { | ||
3280 | fo->cookie.len = -1; | ||
3281 | goto fallback; | ||
3282 | } | ||
3283 | |||
3284 | if (sysctl_tcp_fastopen & TFO_CLIENT_NO_COOKIE) | ||
3285 | fo->cookie.len = -1; | ||
3286 | else if (fo->cookie.len <= 0) | ||
3287 | goto fallback; | 3275 | goto fallback; |
3288 | 3276 | ||
3289 | /* MSS for SYN-data is based on cached MSS and bounded by PMTU and | 3277 | /* MSS for SYN-data is based on cached MSS and bounded by PMTU and |