aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 697b86dd45b3..7f4056785acc 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2573,10 +2573,13 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2573 2573
2574 case TCP_FASTOPEN: 2574 case TCP_FASTOPEN:
2575 if (val >= 0 && ((1 << sk->sk_state) & (TCPF_CLOSE | 2575 if (val >= 0 && ((1 << sk->sk_state) & (TCPF_CLOSE |
2576 TCPF_LISTEN))) 2576 TCPF_LISTEN))) {
2577 tcp_fastopen_init_key_once(true);
2578
2577 err = fastopen_init_queue(sk, val); 2579 err = fastopen_init_queue(sk, val);
2578 else 2580 } else {
2579 err = -EINVAL; 2581 err = -EINVAL;
2582 }
2580 break; 2583 break;
2581 case TCP_TIMESTAMP: 2584 case TCP_TIMESTAMP:
2582 if (!tp->repair) 2585 if (!tp->repair)