Name Date Size #Lines LOC

..12-Jan-2024-

LICENSEH A D08-May-2022755 1411

MakefileH A D25-May-20237.5 KiB202156

READMEH A D08-May-20222.7 KiB8363

pf.confH A D25-May-202311 32

tcp_atomicfrag6.pyH A D08-May-20222.5 KiB9573

tcp_connect.pyH A D08-May-20222.1 KiB7960

tcp_connect6.pyH A D08-May-20222.1 KiB7960

udp_atomicfrag6.pyH A D08-May-20222.4 KiB8868

udp_echo6.pyH A D08-May-20222.4 KiB8970

README

1Regression tests for path MTU discovery implementation in the kernel.
2
3The test suite runs on the machine LOCAL, the kernel under test is
4running on REMOTE.  On LOCAL a Scapy program is simulating a
5connection to REMOTE TCP chargen service.  The source address is a
6non existing address on FAKE_NET.  The LOCAL machine acts as a
7router between REMOTE and virtual FAKE_NET_ADDR and can create ICMP
8packets.
9
10After the three-way handshake REMOTE fills the virtual TCP receive
11buffer of FAKE_NET_ADDR with generated chars.  The data is not
12acknowledged.  Then LOCAL sends a fragmentation-needed ICMP packet
13and expects REMOTE to retransmit the TCP data.  It is checked that
14the TCP packet from the REMOTE side has the MTU size that was
15announced in the ICMP packet.
16
17The same TCP test is done with IPv6 and a packet too big ICMP6.
18
19An IPv6 UDP packet with 1400 octets payload is sent from FAKE_NET
20to REMOTE.  The echo answer triggers an ICMP6 packet too big with
211300 MTU limit from LOCAL.  The response to the next UDP echo packet
22has to be fragmented by REMOTE.
23
24After removing the gateway route of the PMTU route on REMOTE, the
25first IPv6 UDP echo must have 1400 octets payload.  A single ICMP6
26packet too big must change the existing PMTU route so that the next
27echo is fragmented.
28
29EXAMPLE
30
31To run this test I use the following configuration files.
32You should choose a different set of MAC and IP addresses.
33
34- My local machine where I run the regression test:
35
36/etc/hosts
37# to login to qemu with SSH via IPv6 link-local
38fe80::725f:caff:fe21:8d70%tap0		q70
39
40/etc/hostname.tap0
41lladdr fe:e1:ba:d0:d5:6d up
42inet 10.188.70.17 255.255.255.0
43inet6 fdd7:e83e:66bc:70:3e97:eff:fea7:9b2
44!route add -inet 10.188.219.0/24 127.0.0.1 -blackhole
45!route add -inet6 fdd7:e83e:66bc:219::/64 ::1 -blackhole
46
47- My qemu where the kernel under test is running
48
49/etc/hostname.vio0
50lladdr 70:5f:ca:21:8d:70
51inet 10.188.70.70 255.255.255.0
52inet6 fdd7:e83e:66bc:70:725f:caff:fe21:8d70
53!route add -inet 10.188.219.0/24 10.188.70.17
54!route add -inet6 fdd7:e83e:66bc:219::/64 fdd7:e83e:66bc:70:3e97:eff:fea7:9b2
55
56/etc/inetd.conf
57chargen stream  tcp     nowait  root    internal
58chargen stream  tcp6    nowait  root    internal
59echo            dgram   udp6    wait    root    internal
60
61/etc/rc.conf.local
62inetd_flags=
63sshd_flags=
64
65- My environment when executing the test
66
67LOCAL_IF=tap0
68LOCAL_MAC=fe:e1:ba:d0:d5:6d
69REMOTE_MAC=70:5f:ca:21:8d:70
70REMOTE_SSH=q70
71
72LOCAL_ADDR=10.188.70.17
73REMOTE_ADDR=10.188.70.70
74FAKE_NET=10.188.219.0/24
75FAKE_NET_ADDR=10.188.219.188
76
77LOCAL_ADDR6=fdd7:e83e:66bc:70:3e97:eff:fea7:9b2
78REMOTE_ADDR6=fdd7:e83e:66bc:70:725f:caff:fe21:8d70
79FAKE_NET6=fdd7:e83e:66bc:219::/64
80FAKE_NET_ADDR6=fdd7:e83e:66bc:219::188
81
82- Fix your configuration until make check-setup passes
83