fix: the overlay's file sets MTU = 1280 on each node (keel#119) #125
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/overlay-mtu-119"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #119.
Cause
The MTU of wg0. Timeouts and RTT are not the cause. keel wrote no MTU line, so wg-quick took the MTU of the route to an endpoint less 80: 1420 on web-1 and web-3 (BR1), and 1412 on web-2 (BR2, PPPoE, path 1492 bytes). WireGuard pads each packet up to the MTU of its own interface, so a full TCP segment from web-1 (1340 bytes of data) was 1500 bytes on the wire. The path dropped it.
The failure was captured at 04:53 on the real nodes. web-1 sent the segment 9 times in 26.6 s, and each time it was 1500 bytes. The ICMPv6 "packet too big" came at 04:53:39. web-2 stopped at its 30 s answer timeout at 04:53:42 (
did not answer: timed out). The first fragmented packet left at 04:53:49. RTT BR1 to BR2 is 4.2 ms on wg0, with 0 % loss. The channel is plain HTTP over wg0, not TLS. When the PMTU entry is in the cache, 30 of 30 fetches answer in 0.04 s. All the data is inevidence/2026-10-09-br2-channel.md.Fix
keel.network.wireguard.renderwritesMTU = 1280(OVERLAY_MTU). This is the minimum MTU of IPv6, and it is 1360 bytes on the wire over IPv6. It is the same on every node.parsereads that line as keel's own (Parsed.mtu). It names another value as a problem.switch.live_peers: a change of the MTU line causes a bounce, becausewg setcannot set an MTU. The first apply on a node of 0.23.7 bounces wg0 one time. A change of the peers alone stays live.Test
tests/test_network_overlay_mtu_netns.pyuses the real wg-quick. Node B is behind a veth of 1492 bytes that drops longer packets and sends no ICMPv6. A sends a 4 KiB answer over TCP through wg0, with a deadline of 5 s.The new test is added to the mesh / trixie job. Unit tests cover the render, the parse and the bounce rule. Line coverage of wireguard.py is 100 % and of switch.py is 99 %.
@ -0,0 +104,4 @@"""A's answer: 4 KiB to whoever sends a line"""server = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)server.bind((f"{OVERLAY}1", PORT))CodeQL / Binding a socket to all network interfaces
Binding a socket to all interfaces (using '') is a security risk.
Show more details