]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: switch tcp_fastopen key generation to net_get_random_once
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Sat, 19 Oct 2013 19:48:58 +0000 (21:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Oct 2013 23:45:35 +0000 (19:45 -0400)
commit05e9edf8c8c0cfbcb1abc21e0de90a6adbeaae33
tree395011fb151ed3ce911333e1ab70602b2cfbc3e0
parente17616b22c9161c9b6ff4b0e972b01123d39ac24
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>
include/net/tcp.h
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_fastopen.c