Re: Incorrect computation of the MTU in wg-quick

Ismael Bouya <[email protected]>
Newsgroups com.zx2c4.lists.wireguard
Message-ID <xph2i3p5ar5h2w26pse7pmiwiyoqph6zmq5ecbnj32l7w4paan@wh4zxu3vygs7>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEHbA6XjnBfeR3vtz7/R1O9X+pWQIFAmgzntAACgkQ/R1O9X+p
WQJjlw//Sy1KX3yWfOuobJA7zRLFunvU2eSRRtDP8LYcvz5/IXh9XaLgv+8vwL4i
lIeE6xhcXH9o+viqpcKdYQsTVOqQ9hYgG+TLIPsWJPBPUruW5tDmCAl2Of00nXsI
zkRD+gNXKQ8A5Jqbbs1Fcc6T1DFgQU5QqAToFn/LgoC/gZLE0V7yH9iyqBwAXpcW
5/M/xvN/q8yPg4UZazx1Urzg0xQSvBTeEW2uIr4nNdBGeagtlnHI8D5DmL+useyg
FzsKvbw8MAheJTJU5fkG19C+0QQXEqd64taVvnkktDCAw+MQoYBZQzmsLaJLw7uJ
nJKV16sOvtz9i4zFITatGnE9wMFh+cqA8qIVve2ZZH96oEjxJK5KcjwR0fdq50cQ
JeEy8/QZVDz7WbMesSItJHrDcoCG+hHbAJtTogGNMC8lRPD1MWnLHjZDw9pXiSRb
ie/kYKRlBRiWfdRluEzBaeYqWtSVPJ84WFdDnV2a1OP+Xh6/douBDhYBpK8yaZzW
T/hWCD16I2cAee9j4XRFNhI/QWpGxvTelSjwdlKPLuNrXaZg/IJSTxw+Xn87wnLh
ScRyCbA1tRl1dwo+q+bk0651gHGQ/6XN+9A5ynzABeaHiDndtWipw+P5HEvqwM28
H1MtCRRmPLaJyS3F0nUx8bPlrlKz5ibmMAbMqPbnSK3RCBHfXDg=
=OKeQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.