==== run-error-negative ==== cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /home/src/regress/sys/netinet6/rip6cksum/rip6cksum.c cc -o rip6cksum rip6cksum.o # set socket option IPV6_CHECKSUM to -2, expect error doas -n ./rip6cksum -c -2 -e socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum -2 setsockopt failed as expected: Invalid argument ==== run-error-odd ==== # set socket option IPV6_CHECKSUM to 1, expect error doas -n ./rip6cksum -c 1 -e socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 1 setsockopt failed as expected: Invalid argument ==== run-no-cksum ==== # send and receive packet without checksum doas -n ./rip6cksum -r 32 -s 8 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -r 8 -s 32 socket inet6 raw 255 bind ::1 connect ::1 fork child process child pid 10364 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 32 filter proto 255 and len = 52 Begin emission: selected 1 recv packet received payload size 32 send payload of size 8 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 8 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\x02\x03\x04\x05\x06\x07' response protocol next header is 255 received checksum is 62182 received payload length is 8 child program python3 status 0 ==== run-bad-cksum ==== # enable checksum, send packet without checksum, expect icmp doas -n ./rip6cksum -c 0 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 32 -s 32 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 67329 wait for child execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 32 filter icmp6 and len = 124 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 80 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0xab08 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 32 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-disable-cksum ==== # send and receive packet with explicitly disabled checksum doas -n ./rip6cksum -c -1 -r 32 -s 8 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -r 8 -s 32 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum -1 fork child process child pid 19394 execute python3 select socket read /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 32 filter proto 255 and len = 52 Begin emission: Finished sending 1 packets. selected 1 recv packet received payload size 32 send payload of size 8 wait for child * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 8 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\x02\x03\x04\x05\x06\x07' response protocol next header is 255 received checksum is 62182 received payload length is 8 child program python3 status 0 ==== run-ckoff-0 ==== # use checksum at offset 0 doas -n ./rip6cksum -c 0 -r 32 -s 8 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 0 -r 8 -s 32 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 61899 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 32 calculated checksum is 3551 filter proto 255 and len = 52 Begin emission: selected 1 recv packet received payload size 32 send payload of size 8 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 8 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\xf2\xe7\x02\x03\x04\x05\x06\x07' response protocol next header is 255 received checksum is 0 received payload length is 8 child program python3 status 0 ==== run-ckoff-0-empty ==== # use checksum at offset 0, but packet is empty, expect icmp doas -n ./rip6cksum -c 0 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 0 -s 0 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 86243 execute python3 wait for child /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 0 filter icmp6 and len = 92 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 48 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9c49 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 0 nh = 255 hlim = 64 src = ::1 dst = ::1 response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-0-short ==== # use checksum at offset 0, but packet is only 1 byte long, expect icmp doas -n ./rip6cksum -c 0 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 1 -s 1 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 83033 execute python3 wait for child /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 1 filter icmp6 and len = 93 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 49 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9c47 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 1 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-0-exact ==== # use checksum at offset 0, packet is exactly 2 bytes long doas -n ./rip6cksum -c 0 -r 2 -s 2 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 0 -s 2 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 16940 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 2 calculated checksum is 65276 filter proto 255 Begin emission: selected 1 recv packet received payload size 2 send payload of size 2 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 2 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\xfe\xfc' response protocol next header is 255 received checksum is 0 received payload length is 2 child program python3 status 0 ==== run-ckoff-0-long ==== # use checksum at offset 0, packet is 3 bytes long doas -n ./rip6cksum -c 0 -r 3 -s 3 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 0 -s 3 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 0 fork child process child pid 77471 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 3 calculated checksum is 64763 filter proto 255 Begin emission: selected 1 recv packet received payload size 3 send payload of size 3 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 3 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\xfc\xfb\x02' response protocol next header is 255 received checksum is 0 received payload length is 3 child program python3 status 0 ==== run-ckoff-2 ==== # use checksum at offset 2 doas -n ./rip6cksum -c 2 -r 32 -s 8 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 2 -r 8 -s 32 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 98265 execute python3 select socket read /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 32 calculated checksum is 4065 filter proto 255 and len = 52 Begin emission: selected 1 recv packet received payload size 32 send payload of size 8 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 8 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\xf4\xe9\x04\x05\x06\x07' response protocol next header is 255 received checksum is 0 received payload length is 8 child program python3 status 0 ==== run-ckoff-2-empty ==== # use checksum at offset 2, but packet is empty, expect icmp doas -n ./rip6cksum -c 2 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 0 -s 0 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 25816 execute python3 wait for child /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 0 filter icmp6 and len = 92 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 48 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9c49 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 0 nh = 255 hlim = 64 src = ::1 dst = ::1 response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-2-short-1 ==== # use checksum at offset 2, but packet is only 1 byte long, expect icmp doas -n ./rip6cksum -c 2 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 1 -s 1 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 19399 wait for child execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 1 filter icmp6 and len = 93 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 49 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9c47 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 1 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-2-short-2 ==== # use checksum at offset 2, but packet is only 2 byte long, expect icmp doas -n ./rip6cksum -c 2 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 2 -s 2 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 19031 wait for child execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 2 filter icmp6 and len = 94 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 50 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9c44 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 2 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-2-short-3 ==== # use checksum at offset 2, but packet is only 3 byte long, expect icmp doas -n ./rip6cksum -c 2 -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -i -r 3 -s 3 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 39148 execute python3 wait for child /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 3 filter icmp6 and len = 95 Begin emission: Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 51 nh = ICMPv6 hlim = 64 src = ::1 dst = ::1 ###[ ICMPv6 Parameter Problem ]### type = Parameter problem code = unrecognized Next Header type encountered cksum = 0x9a42 ptr = 6 ###[ IPv6 in ICMPv6 ]### version = 6 tc = 0 fl = 0 plen = 3 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\x02' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 ==== run-ckoff-2-exact ==== # use checksum at offset 2, packet is exactly 4 bytes long doas -n ./rip6cksum -c 2 -r 4 -s 4 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 2 -s 4 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 82672 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 4 calculated checksum is 65273 filter proto 255 Begin emission: selected 1 recv packet received payload size 4 send payload of size 4 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 4 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\xfe\xf9' response protocol next header is 255 received checksum is 0 received payload length is 4 child program python3 status 0 ==== run-ckoff-2-long ==== # use checksum at offset 2, packet is 5 bytes long doas -n ./rip6cksum -c 2 -r 5 -s 5 -w -- python3 -u /home/src/regress/sys/netinet6/rip6cksum/sendrecv.py -c 2 -s 5 socket inet6 raw 255 bind ::1 connect ::1 setsockopt ipv6 checksum 2 fork child process child pid 13983 select socket read execute python3 /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release cipher=algorithms.Blowfish, /usr/local/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release cipher=algorithms.CAST5, payload length is 5 calculated checksum is 64248 filter proto 255 Begin emission: selected 1 recv packet received payload size 5 send payload of size 5 wait for child Finished sending 1 packets. * Received 1 packets, got 1 answers, remaining 0 packets (, ) ###[ IPv6 ]### version = 6 tc = 0 fl = 0 plen = 5 nh = 255 hlim = 64 src = ::1 dst = ::1 ###[ Raw ]### load = '\x00\x01\xfa\xf8\x04' response protocol next header is 255 received checksum is 0 received payload length is 5 child program python3 status 0