Update of /cvsroot/freenet/freenet/src/freenet/node/states/FNP
In directory sc8-pr-cvs1:/tmp/cvs-serv25429/src/freenet/node/states/FNP

Modified Files:
        NewRequest.java 
Log Message:
6295:
If HTL == maxHTL, 50% chance of not decrementing. I believe this converges to an extra 
2 hops, somebody please check my math. This provides some plausible deniability when 
you send a request at max HTL (perturb runs only on client level...).
?date= now accepts {+,-}{number}{day|week|etc} - relative date/time support in ?date 
in fproxy, on the CLI etc (Fields.dateTime).

Index: NewRequest.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/FNP/NewRequest.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -w -r1.39 -r1.40
--- NewRequest.java     31 Oct 2003 19:21:20 -0000      1.39
+++ NewRequest.java     31 Oct 2003 23:23:07 -0000      1.40
@@ -104,7 +104,15 @@
            long time5 = System.currentTimeMillis();
            logTime(4, time5-time4, shouldLog);
            
-            if (Math.exp(HTL_FACTOR*htl*htl) < 1 - Core.getRandSource().nextDouble()){
+           double threshold;
+           if(htl == Node.maxHopsToLive)
+               // If it is == maxHopsToLive, 50% chance of not decrementing
+               // This is for plausible deniability
+               threshold = 0.5F;
+           else
+               threshold = Math.exp(HTL_FACTOR*htl*htl);
+           
+           if(threshold < 1 - Core.getRandSource().nextDouble()) {
                 //Core.logger.log(this, "Decrementing HTL",
                 //             Logger.DEBUG);
                 --htl;

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to