Author: toad
Date: 2007-12-05 00:14:41 +0000 (Wed, 05 Dec 2007)
New Revision: 16294
Modified:
trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
If it's encrypted to us, we are the responder and therefore can only receive
phase 1 and 3.
The great thing is that in JFK, there is no state at all to be kept between
phase 1 and 3.
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-12-05
00:03:19 UTC (rev 16293)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-12-05
00:14:41 UTC (rev 16294)
@@ -436,9 +436,18 @@
return;
}
+ // We are the RESPONDER.
+ // Therefore, we can only get packets of phase 1 and 3 here.
- // TODO Auto-generated method stub
-
+ if(packetType == 0) {
+ // Phase 1
+ processJFKMessage1(payload,4,null,replyTo);
+ } else if(packetType == 2) {
+ // Phase 3
+ processJFKMessage3(payload, 3, null, replyTo, false);
+ } else {
+ Logger.error(this, "Invalid phase "+packetType+" for
anonymous-initiator (we are the responder)");
+ }
}
/**