tcp: add support for optional TFO backup key to net.ipv4.tcp_fastopen_key
authorJason Baron <jbaron@akamai.com>
Wed, 29 May 2019 16:33:59 +0000 (12:33 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 20:41:26 +0000 (13:41 -0700)
commitaa1236cdfa898dc4d41cdae8e69d401a2cc7f7f5
tree86921bada63eabf265c6006afa99b942ff26d6db
parent0f1ce0236865e89798c6b610ff2142982f216417
tcp: add support for optional TFO backup key to net.ipv4.tcp_fastopen_key

Add the ability to add a backup TFO key as:

# echo "x-x-x-x,x-x-x-x" > /proc/sys/net/ipv4/tcp_fastopen_key

The key before the comma acks as the primary TFO key and the key after the
comma is the backup TFO key. This change is intended to be backwards
compatible since if only one key is set, userspace will simply read back
that single key as follows:

# echo "x-x-x-x" > /proc/sys/net/ipv4/tcp_fastopen_key
# cat /proc/sys/net/ipv4/tcp_fastopen_key
x-x-x-x

Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/sysctl_net_ipv4.c