]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix Fast Open key endianness
authorYuchung Cheng <ycheng@google.com>
Wed, 27 Jun 2018 23:04:48 +0000 (16:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 09:40:46 +0000 (18:40 +0900)
commit0aa4a86a665416ddc2427c5ca43657fbcc0bd344
tree0bc15c28915912ed264f9dece32400bd116317c4
parentc76dde4c5b21dfa1484b7eafa1f8401f6e1a1028
tcp: fix Fast Open key endianness

Fast Open key could be stored in different endian based on the CPU.
Previously hosts in different endianness in a server farm using
the same key config (sysctl value) would produce different cookies.
This patch fixes it by always storing it as little endian to keep
same API for LE hosts.

Reported-by: Daniele Iamartino <danielei@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/sysctl_net_ipv4.c