Mixed MTU hosts on a network

Jason A. Donenfeld Jason at zx2c4.com
Sat Apr 14 03:38:46 CEST 2018

Hi Roman,

I think that your idea of setting a route-based MTU _should_ work, and
it seems like a bug if it isn't working. There are two places in
WireGuard which directly touch the MTU:

1) When we split GSO superpackets up into normal sized packets. This
code is supposed to be aware of the per-route MTU you've set, so it
shouldn't be a problem. This is the call to skb_gso_segment in

2) When we pad the packet payload. In this case, we pad it to the
nearest multiple of 16, but we don't let it exceed the device MTU.
This is skb_padding in send.c. This behavior seems like the bug in
your particular case, since what matters here is the route's MTU, not
the device MTU. For full 1412 size packets, the payload is presumably
being padded to 1424, since that's still less than the device MTU. In
order to test this theory, try setting your route MTU, as you've
described in your first email, to 1408 (which is a multiple of 16). If
this works, let me know, as it will be good motivation for fixing
skb_padding. If not, then it means there's a problem elsewhere to
investigate too.

I'm CC'ing Luis on this email, as he was working on the MTU code a while back.


More information about the WireGuard mailing list