Re: Incorrect computation of the MTU in wg-quick
"Jason A. Donenfeld" <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard |
|---|---|
| Message-ID | <[email protected]> |
> 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