diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-04 12:25:55 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-04 12:25:55 -0700 |
commit | faefdddc4f71cd099a82ac24055a51438b1ee66a (patch) | |
tree | 5fafda6ea8c4cd128b8d1980184238cbb69f0688 /net/ipv4/tcp.c | |
parent | 0c9561b6f843fad1954e32ed780842f9b6750938 (diff) | |
parent | 69483e398f196d87ca3289f31ad3291bad94af60 (diff) |
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlinux-linaro-lsk-v3.14-android-test
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f605357bcaf7..61cfb9ff9fa1 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2701,10 +2701,13 @@ static int do_tcp_setsockopt(struct sock *sk, int level, case TCP_FASTOPEN: if (val >= 0 && ((1 << sk->sk_state) & (TCPF_CLOSE | - TCPF_LISTEN))) + TCPF_LISTEN))) { + tcp_fastopen_init_key_once(true); + err = fastopen_init_queue(sk, val); - else + } else { err = -EINVAL; + } break; case TCP_TIMESTAMP: if (!tp->repair) |