START sys/netinet/pmtu 2024-11-20T10:07:11Z rm -f addr.py addr.py.tmp echo 'LOCAL_IF = "mcx1"' >>addr.py.tmp echo 'LOCAL_MAC = "98:03:9b:82:ed:f7"' >>addr.py.tmp echo 'REMOTE_MAC = "b8:59:9f:0e:57:55"' >>addr.py.tmp echo 'LOCAL_ADDR = "10.188.31.30"' >>addr.py.tmp echo 'LOCAL_ADDR6 = "fdd7:e83e:66bc:31::30"' >>addr.py.tmp echo 'REMOTE_ADDR = "10.188.31.31"' >>addr.py.tmp echo 'REMOTE_ADDR6 = "fdd7:e83e:66bc:31::31"' >>addr.py.tmp echo 'FAKE_NET_ADDR = "10.188.30.188"' >>addr.py.tmp echo 'FAKE_NET_ADDR6 = "fdd7:e83e:66bc:30::188"' >>addr.py.tmp echo 'FAKE_NET = "10.188.30.0/24"' >>addr.py.tmp echo 'FAKE_NET6 = "fdd7:e83e:66bc:30::/64"' >>addr.py.tmp mv addr.py.tmp addr.py true ssh -t ot11 true Pseudo-terminal will not be allocated because stdin is not a terminal. ==== pfctl ==== # default "block return; pass" interferes with test, use "block; pass" cat addr.py /usr/src/regress/sys/netinet/pmtu/pf.conf | /sbin/pfctl -n -f - cat addr.py /usr/src/regress/sys/netinet/pmtu/pf.conf | /sbin/pfctl -a regress -f - cat addr.py /usr/src/regress/sys/netinet/pmtu/pf.conf | ssh ot11 pfctl -a regress -f - ==== run-ping ==== route -n delete -inet -host 10.188.31.31 || true delete host 10.188.31.31 ssh ot11 route -n delete -inet -host 10.188.30.188 || true delete host 10.188.30.188: not in table Check ping LOCAL_ADDR ping -n -c 1 10.188.31.30 PING 10.188.31.30 (10.188.31.30): 56 data bytes 64 bytes from 10.188.31.30: icmp_seq=0 ttl=255 time=0.153 ms --- 10.188.31.30 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.153/0.153/0.153/0.000 ms Check ping REMOTE_ADDR ping -n -c 1 10.188.31.31 PING 10.188.31.31 (10.188.31.31): 56 data bytes 64 bytes from 10.188.31.31: icmp_seq=0 ttl=255 time=0.327 ms --- 10.188.31.31 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.327/0.327/0.327/0.000 ms ==== run-ping6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188: not in table Check ping6 LOCAL_ADDR6 ping6 -n -c 1 fdd7:e83e:66bc:31::30 PING fdd7:e83e:66bc:31::30 (fdd7:e83e:66bc:31::30): 56 data bytes 64 bytes from fdd7:e83e:66bc:31::30: icmp_seq=0 hlim=64 time=0.206 ms --- fdd7:e83e:66bc:31::30 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.206/0.206/0.206/0.000 ms Check ping6 REMOTE_ADDR6 ping6 -n -c 1 fdd7:e83e:66bc:31::31 PING fdd7:e83e:66bc:31::31 (fdd7:e83e:66bc:31::31): 56 data bytes 64 bytes from fdd7:e83e:66bc:31::31: icmp_seq=0 hlim=64 time=0.408 ms --- fdd7:e83e:66bc:31::31 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.408/0.408/0.408/0.000 ms ==== run-pmtu ==== route -n delete -inet -host 10.188.31.31 || true delete host 10.188.31.31 ssh ot11 route -n delete -inet -host 10.188.30.188 || true delete host 10.188.30.188: not in table Send ICMP fragmentation needed after fake TCP connect PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/tcp_connect.py /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, Send SYN packet, receive SYN+ACK. Begin emission: Finished sending 1 packets. ...* Received 4 packets, got 1 answers, remaining 0 packets Send ACK packet, receive chargen data. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Fill our receive buffer. Send ICMP fragmentation needed packet with MTU 1300. . Sent 1 packets. Path MTU discovery will resend first data with length 1300. Cleanup the other's socket with a reset packet. . Sent 1 packets. len=1300 ==== run-pmtu6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188: not in table Send ICMP6 packet too big after fake TCP connect PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/tcp_connect6.py /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, Send SYN packet, receive SYN+ACK. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Send ACK packet, receive chargen data. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Fill our receive buffer. Send ICMP6 packet too big packet with MTU 1300. . Sent 1 packets. Path MTU discovery will resend first data with length 1300. Cleanup the other's socket with a reset packet. . Sent 1 packets. len=1300 ==== run-udp6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188 Send ICMP6 packet too big after UDP echo PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/udp_echo6.py /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, Send UDP packet with 1400 octets payload, receive echo. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Send ICMP6 packet too big packet with MTU 1300. . Sent 1 packets. Clear route cache at echo socket by sending from different address. . Sent 1 packets. Send UDP packet with 1400 octets payload. . Sent 1 packets. Path MTU discovery will send UDP fragment with maximum length 1300. UDP echo has IPv6 and UDP header, so expected payload len is 1448. elen=1448 Fragments contain multiple of 8 octets, so expected len is 1296. flen=1296 ==== run-gateway6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188 Send ICMP6 packet too big after UDP echo PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/udp_echo6.py /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, Send UDP packet with 1400 octets payload, receive echo. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Send ICMP6 packet too big packet with MTU 1300. . Sent 1 packets. Clear route cache at echo socket by sending from different address. . Sent 1 packets. Send UDP packet with 1400 octets payload. . Sent 1 packets. Path MTU discovery will send UDP fragment with maximum length 1300. UDP echo has IPv6 and UDP header, so expected payload len is 1448. elen=1448 Fragments contain multiple of 8 octets, so expected len is 1296. flen=1296 Remove gateway route of a dynamic PMTU route ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:31::30 delete host fdd7:e83e:66bc:31::30 ssh ot11 route -n get -inet6 -host fdd7:e83e:66bc:30::188 >pmtu.route cat pmtu.route route to: fdd7:e83e:66bc:30::188 destination: fdd7:e83e:66bc:30::188 mask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff gateway: fdd7:e83e:66bc:31::30 interface: mcx1 if address: fdd7:e83e:66bc:31::31 priority: 8 (static) flags: use mtu expire 7 0 593 grep -q 'gateway: fdd7:e83e:66bc:31::30' pmtu.route grep -q 'flags: ' pmtu.route PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/udp_echo6.py /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, Send UDP packet with 1400 octets payload, receive echo. Begin emission: Finished sending 1 packets. ...* Received 4 packets, got 1 answers, remaining 0 packets Send ICMP6 packet too big packet with MTU 1300. . Sent 1 packets. Clear route cache at echo socket by sending from different address. . Sent 1 packets. Send UDP packet with 1400 octets payload. . Sent 1 packets. Path MTU discovery will send UDP fragment with maximum length 1300. UDP echo has IPv6 and UDP header, so expected payload len is 1448. elen=1448 Fragments contain multiple of 8 octets, so expected len is 1296. flen=1296 ==== run-tcpfrag6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188 Send ICMP6 and try to trigger a short TCP segment PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/tcp_atomicfrag6.py /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, Send SYN packet, receive SYN+ACK. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Send ACK packet, receive chargen data. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Fill our receive buffer. Send ICMP6 packet too big packet with MTU 1272. . Sent 1 packets. Path MTU discovery will not resend data, ICMP6 packet is ignored. IPv6 atomic fragments must not be generated. Send ACK again to trigger retransmit. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Cleanup the other's socket with a reset packet. . Sent 1 packets. len=1500 ==== run-udpfrag6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188: not in table Send ICMP6 and try to trigger an atomic UDP IPv6 fragment PYTHONPATH=/usr/src/regress/sys/netinet/pmtu/obj python3 -u /usr/src/regress/sys/netinet/pmtu/udp_atomicfrag6.py /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, Send UDP packet with 1200 octets payload, receive echo. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets Send ICMP6 packet too big packet with MTU 1272. . Sent 1 packets. Clear route cache at echo socket by sending from different address. . Sent 1 packets. Send UDP packet with 1200 octets payload. . Sent 1 packets. Path MTU discovery will not send UDP atomic fragment. IPv6 atomic fragments must not be generated. Send echo again and expect reply without fragmentation. Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets UDP echo has IPv6 and UDP header, so expected payload len is 1248. rlen=1248 ==== reset-route ==== route -n delete -inet -host 10.188.31.31 || true delete host 10.188.31.31 ssh ot11 route -n delete -inet -host 10.188.30.188 || true delete host 10.188.30.188 ==== reset-route6 ==== route -n delete -inet6 -host fdd7:e83e:66bc:31::31 || true delete host fdd7:e83e:66bc:31::31 ssh ot11 route -n delete -inet6 -host fdd7:e83e:66bc:30::188 || true delete host fdd7:e83e:66bc:30::188: not in table PASS sys/netinet/pmtu Duration 1m07.23s