mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
selftests: pmtu: extend MTU parsing helper to locked MTU
The mtu_parse helper introduced in commit f2c929feec
("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>
This commit is contained in:
parent
1e0a720779
commit
72ebddd7ff
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue