diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-10-19 15:48:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-19 19:45:35 -0400 |
commit | 222e83d2e0aecb6a5e8d42b1a8d51332a1eba960 (patch) | |
tree | 395011fb151ed3ce911333e1ab70602b2cfbc3e0 /include/net/tcp.h | |
parent | 1bbdceef1e535add893bf71d7b7ab102e4eb69eb (diff) |
tcp: switch tcp_fastopen key generation to net_get_random_once
Changed key initialization of tcp_fastopen cookies to net_get_random_once.
If the user sets a custom key net_get_random_once must be called at
least once to ensure we don't overwrite the user provided key when the
first cookie is generated later on.
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f30326f1c92b..b12e29a76590 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1322,7 +1322,7 @@ extern struct tcp_fastopen_context __rcu *tcp_fastopen_ctx; | |||
1322 | int tcp_fastopen_reset_cipher(void *key, unsigned int len); | 1322 | int tcp_fastopen_reset_cipher(void *key, unsigned int len); |
1323 | void tcp_fastopen_cookie_gen(__be32 src, __be32 dst, | 1323 | void tcp_fastopen_cookie_gen(__be32 src, __be32 dst, |
1324 | struct tcp_fastopen_cookie *foc); | 1324 | struct tcp_fastopen_cookie *foc); |
1325 | 1325 | void tcp_fastopen_init_key_once(bool publish); | |
1326 | #define TCP_FASTOPEN_KEY_LENGTH 16 | 1326 | #define TCP_FASTOPEN_KEY_LENGTH 16 |
1327 | 1327 | ||
1328 | /* Fastopen key context */ | 1328 | /* Fastopen key context */ |