Incorrect computation of the MTU in wg-quick
Ismael Bouya
ismael at bouya.org
Sun Feb 2 23:47:16 UTC 2025
Hi,
I would like to report a behavior that seems to be incorrect in the way
wg-quick computes the MTU to assign to a wireguard interface:
https://git.zx2c4.com/wireguard-tools/tree/src/wg-quick/linux.bash#n125
In this block, wg-quick goes through every endpoint it knows about,
gets the mtu of the route to reach the endpoint, and takes the highest
value among all the computed values.
However it appears to me that the chosen value should instead be the
lowest among all endpoints rather than the highest.
As an example, if I declare myself (localhost) as an endpoint (it may or
may not be supported, but that’s how I found about this issue), then the
mtu will be set to 65456 (65536-80) which is higher than what the other
endpoints are able to manage, and I’ll only be able to contact myself
properly.
I can provide a (trivial) patch, but I would like confirmation that my
report is correct?
Kind regards,
--
Ismael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20250202/76c390ea/attachment.sig>
More information about the WireGuard
mailing list