Incorrect computation of the MTU in wg-quick
Ismael Bouya
ismael at bouya.org
Sun May 25 22:51:02 UTC 2025
Hi Jason,
It seems to work correctly now, thanks for the fix!
Kind regards,
(Wed, May 21, 2025 at 11:08:43PM +0200) Jason A. Donenfeld :
> > 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.
>
> Thanks for the report. Fixed:
> https://git.zx2c4.com/wireguard-tools/commit/?id=5150cd647073be1f1c12688aef291bdf17970154
>
> Let me know if that looks okay to you.
>
> Jason
--
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/20250526/b363d4ca/attachment.sig>
More information about the WireGuard
mailing list