tcp: fix Fast Open key endianness
authorYuchung Cheng <ycheng@google.com>
Wed, 27 Jun 2018 23:04:48 +0000 (16:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:28:47 +0000 (14:28 +0200)
commit3373d6d056d7b9d1de397498389891b8b95dfd8a
tree60e9f2d71f0b330d3a162fd88a5efa0d80aee11b
parent4f5f7bce308eebcfc8cf63134d4147ccfa8ccb32
tcp: fix Fast Open key endianness

[ Upstream commit c860e997e9170a6d68f9d1e6e2cf61f572191aaf ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/sysctl_net_ipv4.c