[freenet-cvs] r11232 - trunk/freenet/src/freenet/io/comm

cvs at freenetproject.org cvs at freenetproject.org
Tue Dec 5 18:33:01 UTC 2006


Author: toad
Date: 2006-12-05 14:57:13 +0000 (Tue, 05 Dec 2006)
New Revision: 11232

Modified:
   trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
Log:
Assume MTU of 1472 (not 1476).

Modified: trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/UdpSocketManager.java	2006-12-05 00:32:33 UTC (rev 11231)
+++ trunk/freenet/src/freenet/io/comm/UdpSocketManager.java	2006-12-05 14:57:13 UTC (rev 11232)
@@ -673,8 +673,9 @@
      * @return The maximum packet size supported by this SocketManager.
      */
     public int getMaxPacketSize() {
-    	return 1476-28; // GRE (1476) minus headers (20 IP 8 UDP)
-    	// Note that some auth packets can be over 1400 bytes.
+    	return 1472-28; // officially GRE is 1476 and PPPoE is 1492.
+    	// unofficially, PPPoE is often 1472 (seen in the wild). So use that.
+    	// Minus 28 bytes for UDP/IP header.
     }
 
 	/**




More information about the cvs mailing list