Skip to content

Commit

Permalink
Fix bug limiting MTU to 1280
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Juiceman committed Jan 9, 2024
1 parent 6a55cd5 commit c63daf5
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit c63daf5

Please sign in to comment.