diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2018-10-08 15:37:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-08 21:00:23 +0300 |
commit | 72ebddd7fff81e03a0617754d3f5c45ae49cea43 (patch) | |
tree | 824bd714ed8225be1ca54b903e2fd48a9c26b5c1 /tools | |
parent | 1e0a720779531cd2860777534e3674b518ac0a69 (diff) | |
download | linux-72ebddd7fff81e03a0617754d3f5c45ae49cea43.tar.xz |
selftests: pmtu: extend MTU parsing helper to locked MTU
The mtu_parse helper introduced in commit f2c929feeccd ("selftests:
pmtu: Factor out MTU parsing helper") can only handle "mtu 1234", but
not "mtu lock 1234". Extend it, so that we can do IPv4 tests with PMTU
smaller than net.ipv4.route.min_pmtu
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/pmtu.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh index 6c38a7637744..03e56a27f69c 100755 --- a/tools/testing/selftests/net/pmtu.sh +++ b/tools/testing/selftests/net/pmtu.sh @@ -196,7 +196,9 @@ mtu_parse() { next=0 for i in ${input}; do + [ ${next} -eq 1 -a "${i}" = "lock" ] && next=2 && continue [ ${next} -eq 1 ] && echo "${i}" && return + [ ${next} -eq 2 ] && echo "lock ${i}" && return [ "${i}" = "mtu" ] && next=1 done } |