Skip to content
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

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/freenet/io/comm/UdpSocketHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public void sendPacket(byte[] blockToSend, Peer destination, boolean allowLocalA
// http://www.studenten-ins-netz.net/inhalt/service_faq.html
// officially GRE is 1476 and PPPoE is 1492.
// unofficially, PPPoE is often 1472 (seen in the wild). Also PPPoATM is sometimes 1472.
static final int MAX_ALLOWED_MTU = 1280;
static final int MAX_ALLOWED_MTU = 1492;
static final int UDPv4_HEADERS_LENGTH = 28;
static final int UDPv6_HEADERS_LENGTH = 48;
// conservative estimation when AF is not known
Expand Down
2 changes: 1 addition & 1 deletion src/freenet/l10n/freenet.l10n.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Node.notUsingWrapperTitle=Not using the wrapper!
Node.notUsingWrapper=You are running Freenet without the wrapper. This is not recommended. Freenet will not be able to restart itself, so auto-updating won't work, and if Java crashes, it won't get restarted either. Also Freenet can't generate stack dumps in some places so debugging will be marginally harder.
Node.notUsingWrapperShort=Freenet is running without the wrapper. This is not recommended.
Expand Down
Loading