START sys/netinet6/rip6cksum 2025-02-25T05:43:00Z ==== run-error-negative ==== cc -O2 -pipe -g -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/sys/netinet6/rip6cksum/rip6cksum.c cc -o rip6cksum rip6cksum.o # set socket option IPV6_CHECKSUM to -2, expect error ./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 ./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 ./rip6cksum -r 32 -s 8 -w -- python3 -u /usr/src/regress/sys/netinet6/rip6cksum/sendrecv.py -r 8 -s 32 socket inet6 raw 255 bind ::1 connect ::1 fork child process child pid 84960 select socket read execute python3 payload length is 32 filter proto 255 and len = 52 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\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 UNEXPECTED_PASS ==== run-bad-cksum ==== # enable checksum, send packet without checksum, expect icmp ./rip6cksum -c 0 -- python3 -u /usr/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 59946 wait for child execute python3 payload length is 32 filter icmp6 and len = 124 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\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 UNEXPECTED_PASS ==== run-disable-cksum ==== # send and receive packet with explicitly disabled checksum ./rip6cksum -c -1 -r 32 -s 8 -w -- python3 -u /usr/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 32951 select socket read execute python3 payload length is 32 filter proto 255 and len = 52 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\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 UNEXPECTED_PASS ==== run-ckoff-0 ==== # use checksum at offset 0 ./rip6cksum -c 0 -r 32 -s 8 -w -- python3 -u /usr/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 54913 select socket read execute python3 payload length is 32 calculated checksum is 3551 filter proto 255 and len = 52 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\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 UNEXPECTED_PASS ==== run-ckoff-0-empty ==== # use checksum at offset 0, but packet is empty, expect icmp ./rip6cksum -c 0 -- python3 -u /usr/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 8565 wait for child execute python3 payload length is 0 filter icmp6 and len = 92 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 UNEXPECTED_PASS ==== run-ckoff-0-short ==== # use checksum at offset 0, but packet is only 1 byte long, expect icmp ./rip6cksum -c 0 -- python3 -u /usr/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 35335 wait for child execute python3 payload length is 1 filter icmp6 and len = 93 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\x00' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-0-exact ==== # use checksum at offset 0, packet is exactly 2 bytes long ./rip6cksum -c 0 -r 2 -s 2 -w -- python3 -u /usr/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 34786 select socket read execute python3 payload length is 2 calculated checksum is 65276 filter proto 255 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( Begin emission selected 1 recv packet received payload size 2 send payload of size 2 wait for child *. Finished sending 1 packets Received 2 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 = b'\xfe\xfc' response protocol next header is 255 received checksum is 0 received payload length is 2 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-0-long ==== # use checksum at offset 0, packet is 3 bytes long ./rip6cksum -c 0 -r 3 -s 3 -w -- python3 -u /usr/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 73494 select socket read execute python3 payload length is 3 calculated checksum is 64763 filter proto 255 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( Begin emission selected 1 recv packet received payload size 3 send payload of size 3 wait for child *. Finished sending 1 packets Received 2 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 = b'\xfc\xfb\x02' response protocol next header is 255 received checksum is 0 received payload length is 3 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-2 ==== # use checksum at offset 2 ./rip6cksum -c 2 -r 32 -s 8 -w -- python3 -u /usr/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 55372 select socket read execute python3 payload length is 32 calculated checksum is 4065 filter proto 255 and len = 52 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\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 UNEXPECTED_PASS ==== run-ckoff-2-empty ==== # use checksum at offset 2, but packet is empty, expect icmp ./rip6cksum -c 2 -- python3 -u /usr/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 94588 wait for child execute python3 payload length is 0 filter icmp6 and len = 92 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 UNEXPECTED_PASS ==== run-ckoff-2-short-1 ==== # use checksum at offset 2, but packet is only 1 byte long, expect icmp ./rip6cksum -c 2 -- python3 -u /usr/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 30792 wait for child execute python3 payload length is 1 filter icmp6 and len = 93 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\x00' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-2-short-2 ==== # use checksum at offset 2, but packet is only 2 byte long, expect icmp ./rip6cksum -c 2 -- python3 -u /usr/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 89536 wait for child execute python3 payload length is 2 filter icmp6 and len = 94 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\x00\x01' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-2-short-3 ==== # use checksum at offset 2, but packet is only 3 byte long, expect icmp ./rip6cksum -c 2 -- python3 -u /usr/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 80615 wait for child execute python3 payload length is 3 filter icmp6 and len = 95 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( 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 = b'\x00\x01\x02' response protocol next header is 58 response icmp6 type is 4 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-2-exact ==== # use checksum at offset 2, packet is exactly 4 bytes long ./rip6cksum -c 2 -r 4 -s 4 -w -- python3 -u /usr/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 91071 select socket read execute python3 payload length is 4 calculated checksum is 65273 filter proto 255 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( Begin emission selected 1 recv packet received payload size 4 send payload of size 4 wait for child *. Finished sending 1 packets Received 2 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 = b'\x00\x01\xfe\xf9' response protocol next header is 255 received checksum is 0 received payload length is 4 child program python3 status 0 UNEXPECTED_PASS ==== run-ckoff-2-long ==== # use checksum at offset 2, packet is 5 bytes long ./rip6cksum -c 2 -r 5 -s 5 -w -- python3 -u /usr/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 25661 select socket read execute python3 payload length is 5 calculated checksum is 64248 filter proto 255 /usr/local/lib/python3.12/site-packages/scapy/sendrecv.py:699: SyntaxWarning: 'iface' has no effect on L3 I/O sr(). For multicast/link-local see https://scapy.readthedocs.io/en/latest/usage.html#multicast warnings.warn( Begin emission selected 1 recv packet received payload size 5 send payload of size 5 wait for child *. Finished sending 1 packets Received 2 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 = b'\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 UNEXPECTED_PASS XPASS sys/netinet6/rip6cksum child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0, child program python3 status 0