2 # SPDX-License-Identifier: GPL-2.0
4 # rotate TFO keys for ipv4/ipv6 and verify that the client does
5 # not present an invalid cookie.
10 readonly NETNS="ns-$(mktemp -u XXXXXX)"
13 ip netns add "${NETNS}"
14 ip -netns "${NETNS}" link set lo up
15 ip netns exec "${NETNS}" sysctl -w net.ipv4.tcp_fastopen=3 \
20 ip netns del "${NETNS}"
27 # flush routes before each run, otherwise successive runs can
28 # initially present an old TFO cookie
29 ip netns exec "${NETNS}" ip tcp_metrics flush
30 ip netns exec "${NETNS}" ./tcp_fastopen_backup_key "$1"
31 val=$(ip netns exec "${NETNS}" nstat -az | \
32 grep TcpExtTCPFastOpenPassiveFail | awk '{print $2}')
33 if [ "$val" != 0 ]; then
34 echo "FAIL: TcpExtTCPFastOpenPassiveFail non-zero"