mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
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: Florian Westphal <fw@strlen.de> Link: https://lore.kernel.org/r/20240423130604.7013-5-fw@strlen.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
c54fa6ae35
commit
f84ab63490
|
|
@ -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
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user