-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug limiting MTU to 1280 #881
Conversation
In UdpSocketHandler.innerCalculateMaxPacketSize() the lesser of the configurable variable node.maxPacketSize and UdpSocketHandler.MAX_ALLOWED_MTU is used, the latter of which was hard coded to 1280.
@Juiceman Thank you for your PR! Is this change tested on different networks? Is the reasoning for 1280 no longer valid? |
Unfortunately, this value is used for both IPv6 and IPv4. The 'safe' 1280
is only relevant to IPv6 (and cloudflare has an interesting write up
https://blog.cloudflare.com/increasing-ipv6-mtu)
We set the config menu default to 1280, the config menu allows values up to
1492 but would the node would never use a value larger than 1280. The user
is never informed and the config still shows their selected value.
…On Sun, Jan 28, 2024 at 4:01 AM David Roden ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/freenet/l10n/freenet.l10n.en.properties
<#881 (comment)>:
> @@ -1223,7 +1223,7 @@ Node.trafficClassLong=The TrafficClass value to pass to Socket.setTrafficClass()
Node.nodeName=Nickname for this Freenet node
Node.nodeNameLong=Node nickname. This will be visible to your friends only.
Node.maxPacketSize=Maximum packet size (aka MTU)
-Node.maxPacketSizeLong=Maximum size of the UDP packets Freenet sends, assuming UDP/IP headers are 28 bytes. We will use the MTU of the interface if we can detect it, but mostly obstructions happen elsewhere, and unfortunately we cannot easily detect the path MTU.
+Node.maxPacketSizeLong=Maximum size of the UDP packets Freenet sends, assuming UDP/IP headers are 48 bytes (to accommodate IPv6). We will use the MTU of the interface if we can detect it, but mostly obstructions happen elsewhere, and unfortunately we cannot easily detect the path MTU. If you are using IPv6, you are more likely to run into issues if you choose values >1400 because IPv6 will not fragment packets, but drops them instead. 1280 is a safe value.
Wait, so, we’re saying “1280 is safe” and then set the default to 1492?!
—
Reply to this email directly, view it on GitHub
<#881 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATAMM44NE7SNCBMNHPUQ3YQYHWHAVCNFSM6AAAAABBSNTH56VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNBXGQ2DMNZXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
I may disagree with what you have to say, but I shall defend, to the death,
your right to say it. - Voltaire
Those who would give up Liberty, to purchase temporary Safety, deserve
neither Liberty nor Safety. - Ben Franklin
|
Ah, alright, so it only brings the displayed value in line with the one that’s used? That’s fine, then. 🙂 |
Approved by @Bombe ⇒ Merged. Thank you both! |
In UdpSocketHandler.innerCalculateMaxPacketSize() the lesser of the configurable variable node.maxPacketSize and UdpSocketHandler.MAX_ALLOWED_MTU is used, the latter of which was hard coded to 1280.