diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh index 7fd55a5d78b5..0fe5069cf74c 100644 --- a/tests/sys/netpfil/pf/ether.sh +++ b/tests/sys/netpfil/pf/ether.sh @@ -668,13 +668,10 @@ short_pkt_body() # Try sending ever shorter ping requests # BPF won't let us send anything shorter than an Ethernet header, but # that's good enough for this test - for i in `seq 46 14` - do - $(atf_get_srcdir)/pft_ether.py \ - --sendif ${epair}a \ - --to 192.0.2.2 \ - --len ${i} - done + $(atf_get_srcdir)/pft_ether.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --len 14-64 } short_pkt_cleanup() diff --git a/tests/sys/netpfil/pf/pft_ether.py b/tests/sys/netpfil/pf/pft_ether.py index 1892e0a8f95e..4efb974f7897 100644 --- a/tests/sys/netpfil/pf/pft_ether.py +++ b/tests/sys/netpfil/pf/pft_ether.py @@ -61,7 +61,12 @@ def main(): args = parser.parse_args() - ping(args.sendif[0], args.to[0], int(args.len[0])) + if '-' in args.len[0]: + s=args.len[0].split('-') + for i in range(int(s[0]), int(s[1]) + 1): + ping(args.sendif[0], args.to[0], i) + else: + ping(args.sendif[0], args.to[0], int(args.len[0])) if __name__ == '__main__': main()