Commit f84ab634 authored by Florian Westphal's avatar Florian Westphal Committed by Jakub Kicinski

selftests: netfilter: nft_flowtable.sh: re-run with random mtu sizes

Now that the test runs much faster, also re-run it with random MTU sizes
for the different link legs.  flowtable should pass ip fragments, if
any, up to the normal forwarding path.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240423130604.7013-5-fw@strlen.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c54fa6ae
...@@ -100,6 +100,14 @@ if ! ip -net $nsr2 link set veth1 mtu $rmtu; then ...@@ -100,6 +100,14 @@ if ! ip -net $nsr2 link set veth1 mtu $rmtu; then
exit 1 exit 1
fi fi
if ! ip -net "$nsr1" link set veth1 mtu "$lmtu"; then
exit 1
fi
if ! ip -net "$nsr2" link set veth0 mtu "$lmtu"; then
exit 1
fi
ip -net $ns2 link set eth0 mtu $rmtu ip -net $ns2 link set eth0 mtu $rmtu
# transfer-net between nsr1 and nsr2. # transfer-net between nsr1 and nsr2.
...@@ -633,4 +641,15 @@ else ...@@ -633,4 +641,15 @@ else
ip netns exec "$nsr1" cat /proc/net/xfrm_stat 1>&2 ip netns exec "$nsr1" cat /proc/net/xfrm_stat 1>&2
fi fi
if [ x"$1" = x ]; then
low=1280
mtu=$((65536 - low))
o=$(((RANDOM%mtu) + low))
l=$(((RANDOM%mtu) + low))
r=$(((RANDOM%mtu) + low))
echo "re-run with random mtus: -o $o -l $l -r $r"
$0 -o "$o" -l "$l" -r "$r"
fi
exit $ret exit $ret
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment