Author: zothar
Date: 2008-01-09 03:55:04 +0000 (Wed, 09 Jan 2008)
New Revision: 16979

Modified:
   trunk/freenet/src/freenet/node/NodeARKInserter.java
Log:
I believe this implement differential node references for detected IP addresses 
changing physical.udp, though it is untested because my environment isn't setup 
for testing it easily.  ipOverride config settings aren't implemented yet, in 
part because I haven't figured out how to best handle it yet.

Modified: trunk/freenet/src/freenet/node/NodeARKInserter.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeARKInserter.java 2008-01-09 02:42:36 UTC 
(rev 16978)
+++ trunk/freenet/src/freenet/node/NodeARKInserter.java 2008-01-09 03:55:04 UTC 
(rev 16979)
@@ -58,6 +58,14 @@
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
                if(logMINOR) Logger.minor(this, "update()");
                if(!checkIPUpdated()) return;
+               // We'll broadcast the new physical.udp entry to our connected 
peers via a differential node reference
+               // We'll err on the side of caution and not update our peer to 
an empty physical.udp entry using a differential node reference
+               SimpleFieldSet nfs = crypto.exportPublicFieldSet(true, false); 
// More or less
+               if(nfs.get("physical.udp") != null) {
+                       SimpleFieldSet fs = nfs.subset("physical.udp");
+                       node.peers.locallyBroadcastDiffNodeRef(fs, 
!crypto.isOpennet, crypto.isOpennet);
+               }
+               // Proceed with inserting the ARK
                if(logMINOR) Logger.minor(this, "Inserting ARK because peers 
list changed");

                if(inserter != null) {


Reply via email to