Author: toad
Date: 2008-01-31 23:02:46 +0000 (Thu, 31 Jan 2008)
New Revision: 17449

Modified:
   trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
Log:
Don't count localhost and LAN addresses towards if-no-connections-then-detect

Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-01-31 
22:59:32 UTC (rev 17448)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-01-31 
23:02:46 UTC (rev 17449)
@@ -347,6 +347,11 @@
                        for(int i=0;i<peers.length;i++) {
                                PeerNode p = peers[i];
                                if(p.isDisabled()) continue;
+                               // Don't count localhost, LAN addresses.
+                               InetAddress addr = 
p.getPeer().getAddress(false);
+                               if(addr != null) {
+                                       if(!IPUtil.isValidAddress(addr, false)) 
continue;
+                               }
                                maybeUrgent = true;
                                if(logMINOR) Logger.minor(this, "No 
connections, but have peers, may detect...");
                                break;


Reply via email to