summaryrefslogtreecommitdiffhomepage
path: root/src/tests/netns.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/netns.sh')
-rwxr-xr-xsrc/tests/netns.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 57d0b28..d1950a0 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -169,6 +169,19 @@ ip1 link set wg0 mtu $big_mtu
ip2 link set wg0 mtu $big_mtu
tests
+# Test that route MTUs work with the padding
+ip1 link set wg0 mtu 1300
+ip2 link set wg0 mtu 1300
+n1 wg set wg0 peer "$pub2" endpoint 127.0.0.1:2
+n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
+n0 iptables -A INPUT -m length --length 1360 -j DROP
+n1 ip route add 192.168.241.2/32 dev wg0 mtu 1299
+n2 ip route add 192.168.241.1/32 dev wg0 mtu 1299
+n2 ping -c 1 -W 1 -s 1269 192.168.241.1
+n2 ip route delete 192.168.241.1/32 dev wg0 mtu 1299
+n1 ip route delete 192.168.241.2/32 dev wg0 mtu 1299
+n0 iptables -F INPUT
+
ip1 link set wg0 mtu $orig_mtu
ip2 link set wg0 mtu $orig_mtu