diff --git a/tests/sys/netinet6/frag6/frag6_01.sh b/tests/sys/netinet6/frag6/frag6_01.sh index fb2e1de856d3..198cc15bebd6 100755 --- a/tests/sys/netinet6/frag6/frag6_01.sh +++ b/tests/sys/netinet6/frag6/frag6_01.sh @@ -52,6 +52,16 @@ frag6_01_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_02.sh b/tests/sys/netinet6/frag6/frag6_02.sh index 02d2a5a1e723..d3573d53eeb4 100755 --- a/tests/sys/netinet6/frag6/frag6_02.sh +++ b/tests/sys/netinet6/frag6/frag6_02.sh @@ -52,6 +52,16 @@ frag6_02_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_03.py b/tests/sys/netinet6/frag6/frag6_03.py index 64c92abfecc8..c3f890c7bc40 100644 --- a/tests/sys/netinet6/frag6/frag6_03.py +++ b/tests/sys/netinet6/frag6/frag6_03.py @@ -82,20 +82,21 @@ def main(): ######################################################################## # - # (1) Atomic fragment. + # Atomic fragment. # # A: Nothing listening on UDP port. # R: ICMPv6 dst unreach, unreach port. # ip6f01 = sp.Ether() / \ sp.IPv6(src=args.src[0], dst=args.to[0]) / \ - sp.IPv6ExtHdrFragment(offset=0, m=0, id=1) / \ + sp.IPv6ExtHdrFragment(offset=0, m=0, id=3) / \ sp.UDP(dport=3456, sport=6543) if args.debug : ip6f01.display() sp.sendp(ip6f01, iface=args.sendif[0], verbose=False) sleep(0.10) + sniffer.setEnd() sniffer.join() if not sniffer.foundCorrectPacket: sys.exit(1) diff --git a/tests/sys/netinet6/frag6/frag6_03.sh b/tests/sys/netinet6/frag6/frag6_03.sh index edfdbe04d101..1881ff463229 100755 --- a/tests/sys/netinet6/frag6/frag6_03.sh +++ b/tests/sys/netinet6/frag6/frag6_03.sh @@ -52,6 +52,16 @@ frag6_03_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_04.sh b/tests/sys/netinet6/frag6/frag6_04.sh index 81f3a276514c..5655d9c8e63b 100755 --- a/tests/sys/netinet6/frag6/frag6_04.sh +++ b/tests/sys/netinet6/frag6/frag6_04.sh @@ -52,6 +52,16 @@ frag6_04_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_05.py b/tests/sys/netinet6/frag6/frag6_05.py index b631b48f500f..d67c35581bbf 100644 --- a/tests/sys/netinet6/frag6/frag6_05.py +++ b/tests/sys/netinet6/frag6/frag6_05.py @@ -76,6 +76,8 @@ def main(): ip6f01.display() sp.sendp(ip6f01, iface=args.sendif[0], verbose=False) + # Wait for possible expiry to happen. + sleep(75) sys.exit(0) if __name__ == '__main__': diff --git a/tests/sys/netinet6/frag6/frag6_05.sh b/tests/sys/netinet6/frag6/frag6_05.sh index ed4c09b60d69..ff1504a6b023 100755 --- a/tests/sys/netinet6/frag6/frag6_05.sh +++ b/tests/sys/netinet6/frag6/frag6_05.sh @@ -47,6 +47,17 @@ frag6_05_check_stats_0() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check that the sysctl is set to what we expect. # @@ -229,6 +240,16 @@ frag6_05_check_stats_1() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check that the sysctl is set to what we expect. @@ -272,7 +293,7 @@ EOF 0 20 10 - 0 + 10 0 0 0 @@ -300,7 +321,7 @@ EOF # XXX-TODO check output histogram (just too hard to parse [no multi-line-grep]) # cat < ${HOME}/filter-${jname}.txt - 0 + 10 0 0 0 @@ -308,7 +329,7 @@ EOF 0 0 0 - 0 + 10 0 0 0 @@ -372,10 +393,10 @@ EOF 0 0 0 - 0 + 10 0 0 - 0 + 10 0 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_06.sh b/tests/sys/netinet6/frag6/frag6_06.sh index f5997c80f8a7..d8ee70d22401 100755 --- a/tests/sys/netinet6/frag6/frag6_06.sh +++ b/tests/sys/netinet6/frag6/frag6_06.sh @@ -61,6 +61,17 @@ frag6_06_check_stats_0() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check that the sysctl is set to what we expect. # diff --git a/tests/sys/netinet6/frag6/frag6_07.py b/tests/sys/netinet6/frag6/frag6_07.py index f559046e67bf..c84a783137d3 100644 --- a/tests/sys/netinet6/frag6/frag6_07.py +++ b/tests/sys/netinet6/frag6/frag6_07.py @@ -54,6 +54,25 @@ def check_icmp6_error(args, packet): #icmp6.display() return True +def check_icmp6_error_2(args, packet): + ip6 = packet.getlayer(sp.IPv6) + if not ip6: + return False + oip6 = sp.IPv6(src=args.src[0], dst=args.to[0]) + if ip6.dst != oip6.src: + return False + icmp6 = packet.getlayer(sp.ICMPv6TimeExceeded) + if not icmp6: + return False + # ICMP6_TIME_EXCEED_REASSEMBLY 1 + if icmp6.code != 1: + return False + # Should we check the payload as well? + # We are running in a very isolated environment and nothing else + # should trigger an ICMPv6 Time Exceeded / Frag reassembly so leave it. + #icmp6.display() + return True + def main(): parser = argparse.ArgumentParser("frag6.py", description="IPv6 fragementation test tool") @@ -78,6 +97,7 @@ def main(): # Start sniffing on recvif sniffer = Sniffer(args, check_icmp6_error) + sniffer2 = Sniffer(args, check_icmp6_error_2) ######################################################################## @@ -88,6 +108,7 @@ def main(): # # A: Reassembly failure. # R: ICMPv6 param prob, param header. + # R: ICMPv6 timeout (1st frag, off=0) # data = "6" * 1280 ip6f01 = \ @@ -144,6 +165,13 @@ def main(): if not sniffer.foundCorrectPacket: sys.exit(1) + # Wait for expiry from first test run. + sleep(75) + sniffer2.setEnd() + sniffer2.join() + if not sniffer2.foundCorrectPacket: + sys.exit(1) + sys.exit(0) if __name__ == '__main__': diff --git a/tests/sys/netinet6/frag6/frag6_07.sh b/tests/sys/netinet6/frag6/frag6_07.sh index 927472b794a8..fcd719e52e4d 100755 --- a/tests/sys/netinet6/frag6/frag6_07.sh +++ b/tests/sys/netinet6/frag6/frag6_07.sh @@ -47,6 +47,17 @@ frag6_07_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check selection of global UDP stats. # @@ -81,7 +92,7 @@ EOF 0 3 0 - 0 + 1 0 0 0 @@ -109,7 +120,7 @@ EOF # XXX-TODO check output histogram (just too hard to parse [no multi-line-grep]) # cat < ${HOME}/filter-${jname}.txt - 2 + 3 0 0 0 @@ -117,7 +128,7 @@ EOF 0 0 0 - 0 + 1 2 0 0 @@ -181,10 +192,10 @@ EOF 0 0 0 - 2 + 3 0 0 - 0 + 1 2 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_08.py b/tests/sys/netinet6/frag6/frag6_08.py index 7d63c11b58a6..fa17e1e5c774 100644 --- a/tests/sys/netinet6/frag6/frag6_08.py +++ b/tests/sys/netinet6/frag6/frag6_08.py @@ -54,6 +54,26 @@ def check_icmp6_error(args, packet): #icmp6.display() return True +def check_icmp6_error_2(args, packet): + ip6 = packet.getlayer(sp.IPv6) + if not ip6: + return False + oip6 = sp.IPv6(src=args.src[0], dst=args.to[0]) + if ip6.dst != oip6.src: + return False + icmp6 = packet.getlayer(sp.ICMPv6TimeExceeded) + if not icmp6: + return False + # ICMP6_TIME_EXCEED_REASSEMBLY 1 + if icmp6.code != 1: + return False + # Should we check the payload as well? + # We are running in a very isolated environment and nothing else + # should trigger an ICMPv6 Time Exceeded / Frag reassembly so leave it. + #icmp6.display() + return True + + def main(): parser = argparse.ArgumentParser("frag6.py", description="IPv6 fragementation test tool") @@ -78,15 +98,20 @@ def main(): # Start sniffing on recvif sniffer = Sniffer(args, check_icmp6_error) + sniffer2 = Sniffer(args, check_icmp6_error_2) ######################################################################## # # A fragment with payload and offset set to add up to >64k when # another frag with offset=0 arrives and has an unfrag part. + # This is us checking for all fragments queued already when the + # one with off=0 arrives. Note: unless the off=0 has its own problem + # it will be queued and off!=0 ones might be expunged with param prob. # - # A: Reassembly failure (timeout) after - # R: ICMPv6 param prob, param header (earlier). + # A: Reassembly failure, timeout after + # R: ICMPv6 param prob, param header (1st frag) + # R: ICMPv6 time exceeded (2nd frag, as off=0) # data = "6" * 15 ip6f01 = \ @@ -115,6 +140,11 @@ def main(): sniffer.join() if not sniffer.foundCorrectPacket: sys.exit(1) + sleep(75) + sniffer2.setEnd() + sniffer2.join() + if not sniffer2.foundCorrectPacket: + sys.exit(1) sys.exit(0) diff --git a/tests/sys/netinet6/frag6/frag6_08.sh b/tests/sys/netinet6/frag6/frag6_08.sh index 3de04f539e08..19aa7214494d 100755 --- a/tests/sys/netinet6/frag6/frag6_08.sh +++ b/tests/sys/netinet6/frag6/frag6_08.sh @@ -47,6 +47,17 @@ frag6_08_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check selection of global UDP stats. # @@ -81,7 +92,7 @@ EOF 0 2 0 - 0 + 1 0 0 0 @@ -109,7 +120,7 @@ EOF # XXX-TODO check output histogram (just too hard to parse [no multi-line-grep]) # cat < ${HOME}/filter-${jname}.txt - 1 + 2 0 0 0 @@ -117,7 +128,7 @@ EOF 0 0 0 - 0 + 1 1 0 0 @@ -181,10 +192,10 @@ EOF 0 0 0 - 1 + 2 0 0 - 0 + 1 1 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_09.sh b/tests/sys/netinet6/frag6/frag6_09.sh index 6936a75d397a..e97cc03e5843 100755 --- a/tests/sys/netinet6/frag6/frag6_09.sh +++ b/tests/sys/netinet6/frag6/frag6_09.sh @@ -52,6 +52,16 @@ frag6_09_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_10.py b/tests/sys/netinet6/frag6/frag6_10.py index 716324a469d9..02d25bd96450 100644 --- a/tests/sys/netinet6/frag6/frag6_10.py +++ b/tests/sys/netinet6/frag6/frag6_10.py @@ -72,6 +72,8 @@ def main(): sp.sendp(ip6f01, iface=args.sendif[0], verbose=False) # We do not generate ICMPv6 for non-off=0-segments. + # Wait for expiry. + sleep(75) sys.exit(0) diff --git a/tests/sys/netinet6/frag6/frag6_10.sh b/tests/sys/netinet6/frag6/frag6_10.sh index fb1a26ad8699..bf3d0f4e2070 100755 --- a/tests/sys/netinet6/frag6/frag6_10.sh +++ b/tests/sys/netinet6/frag6/frag6_10.sh @@ -52,6 +52,16 @@ frag6_10_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. @@ -77,8 +87,8 @@ EOF # # Check selection of global IPv6 stats. - # We do not seem to sent a timeout ICMPv6 for this one? - # No, as it is not an off=0 segment. + # We do not sent a timeout ICMPv6 for this one + # as it is not an off=0 segment. # cat < ${HOME}/filter-${jname}.txt 0 @@ -87,7 +97,7 @@ EOF 0 1 0 - 0 + 1 0 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_11.sh b/tests/sys/netinet6/frag6/frag6_11.sh index 606b7d936c15..6329d7cd7677 100755 --- a/tests/sys/netinet6/frag6/frag6_11.sh +++ b/tests/sys/netinet6/frag6/frag6_11.sh @@ -52,6 +52,16 @@ frag6_11_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_12.sh b/tests/sys/netinet6/frag6/frag6_12.sh index 33121b868922..7fdee7f850b2 100755 --- a/tests/sys/netinet6/frag6/frag6_12.sh +++ b/tests/sys/netinet6/frag6/frag6_12.sh @@ -52,6 +52,16 @@ frag6_12_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. diff --git a/tests/sys/netinet6/frag6/frag6_13.py b/tests/sys/netinet6/frag6/frag6_13.py index 4ff96990db60..da3b2afe239f 100644 --- a/tests/sys/netinet6/frag6/frag6_13.py +++ b/tests/sys/netinet6/frag6/frag6_13.py @@ -114,6 +114,8 @@ def main(): sp.sendp(ip6f01, iface=args.sendif[0], verbose=False) sp.sendp(ip6f02, iface=args.sendif[0], verbose=False) + # Wait for expiry. + sleep(75) sys.exit(0) if __name__ == '__main__': diff --git a/tests/sys/netinet6/frag6/frag6_13.sh b/tests/sys/netinet6/frag6/frag6_13.sh index 22d143a0f0af..c6d64dd82d45 100755 --- a/tests/sys/netinet6/frag6/frag6_13.sh +++ b/tests/sys/netinet6/frag6/frag6_13.sh @@ -52,6 +52,16 @@ frag6_13_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. @@ -85,7 +95,7 @@ EOF 0 4 2 - 0 + 2 0 0 0 @@ -112,7 +122,7 @@ EOF # Check selection of global ICMPv6 stats. # cat < ${HOME}/filter-${jname}.txt - 0 + 2 0 0 0 @@ -120,7 +130,7 @@ EOF 0 0 0 - 0 + 2 0 0 0 @@ -184,10 +194,10 @@ EOF 0 0 0 - 0 + 2 0 0 - 0 + 2 0 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_14.py b/tests/sys/netinet6/frag6/frag6_14.py index a1533aa6c887..915571cfc36f 100644 --- a/tests/sys/netinet6/frag6/frag6_14.py +++ b/tests/sys/netinet6/frag6/frag6_14.py @@ -129,6 +129,8 @@ def main(): sp.sendp(ip6f01, iface=args.sendif[0], verbose=False) sp.sendp(ip6f02, iface=args.sendif[0], verbose=False) + # Wait for expiry. + sleep(75) sys.exit(0) if __name__ == '__main__': diff --git a/tests/sys/netinet6/frag6/frag6_14.sh b/tests/sys/netinet6/frag6/frag6_14.sh index 7c9a04119923..11acfbb68694 100755 --- a/tests/sys/netinet6/frag6/frag6_14.sh +++ b/tests/sys/netinet6/frag6/frag6_14.sh @@ -52,6 +52,16 @@ frag6_14_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac # # Check selection of global UDP stats. @@ -85,7 +95,7 @@ EOF 0 6 2 - 0 + 4 0 0 0 @@ -112,7 +122,7 @@ EOF # Check selection of global ICMPv6 stats. # cat < ${HOME}/filter-${jname}.txt - 0 + 1 0 0 0 @@ -120,7 +130,7 @@ EOF 0 0 0 - 0 + 1 0 0 0 @@ -184,10 +194,10 @@ EOF 0 0 0 - 0 + 1 0 0 - 0 + 1 0 0 0 diff --git a/tests/sys/netinet6/frag6/frag6_15.sh b/tests/sys/netinet6/frag6/frag6_15.sh index 1b31bf103994..2b6317ecb7f0 100755 --- a/tests/sys/netinet6/frag6/frag6_15.sh +++ b/tests/sys/netinet6/frag6/frag6_15.sh @@ -61,6 +61,17 @@ frag6_15_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check that the sysctl is set to what we expect. # diff --git a/tests/sys/netinet6/frag6/frag6_16.sh b/tests/sys/netinet6/frag6/frag6_16.sh index 2d0e43b3a39e..f5f582ec7823 100755 --- a/tests/sys/netinet6/frag6/frag6_16.sh +++ b/tests/sys/netinet6/frag6/frag6_16.sh @@ -48,6 +48,17 @@ frag6_16_check_stats() { # The Python script has to wait for this already to get the ICMPv6 # hence we do not sleep here anymore. + nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets` + case ${nf} in + 0) break ;; + *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;; + esac + nf=`sysctl -n net.inet6.ip6.frag6_nfrags` + case ${nf} in + 0) break ;; + *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;; + esac + # # Check selection of global UDP stats. #