Author: nextgens
Date: 2007-02-25 18:08:47 +0000 (Sun, 25 Feb 2007)
New Revision: 11919

Modified:
   trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
Log:
doh: I forgot to substract the payload

Modified: trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/UdpSocketManager.java     2007-02-25 
18:03:25 UTC (rev 11918)
+++ trunk/freenet/src/freenet/io/comm/UdpSocketManager.java     2007-02-25 
18:08:47 UTC (rev 11919)
@@ -684,9 +684,10 @@
      */
     public int getMaxPacketSize() { //FIXME: what about passing a peerNode 
though and doing it on a per-peer basis?
        final int minAdvertizedMTU = node.ipDetector.getMinimumDetectedMTU();
-       final int maxAllowedMTU = 1400-28;
+       final int maxAllowedMTU = 1400;
+       final int overhead = 28;

-       return minAdvertizedMTU < maxAllowedMTU ? minAdvertizedMTU : 
maxAllowedMTU;
+       return (minAdvertizedMTU < maxAllowedMTU ? minAdvertizedMTU : 
maxAllowedMTU) - overhead;
        // CompuServe use 1400 MTU; AOL claim 1450; DFN at home use 1448.
        // http://info.aol.co.uk/broadband/faqHomeNetworking.adp
        // 
http://www.compuserve.de/cso/hilfe/linux/hilfekategorien/installation/contentview.jsp?conid=385700


Reply via email to