Author: toad
Date: 2008-01-15 16:44:19 +0000 (Tue, 15 Jan 2008)
New Revision: 17059

Modified:
   trunk/freenet/src/freenet/node/NodeDispatcher.java
Log:
[16:42] <nextgens> toad_>  a cheap way to DoS a seednode is to ask it for UoM

Modified: trunk/freenet/src/freenet/node/NodeDispatcher.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeDispatcher.java  2008-01-15 13:19:21 UTC 
(rev 17058)
+++ trunk/freenet/src/freenet/node/NodeDispatcher.java  2008-01-15 16:44:19 UTC 
(rev 17059)
@@ -91,17 +91,17 @@
                } else if(spec == DMT.nodeToNodeMessage) {
                        node.receivedNodeToNodeMessage(m, source);
                        return true;
-               } else if(spec == DMT.UOMAnnounce) {
+               } else if(spec == DMT.UOMAnnounce && source.isSearchable()) {
                        return node.nodeUpdater.uom.handleAnnounce(m, source);
-               } else if(spec == DMT.UOMRequestRevocation) {
+               } else if(spec == DMT.UOMRequestRevocation && 
source.isSearchable()) {
                        return node.nodeUpdater.uom.handleRequestRevocation(m, 
source);
-               } else if(spec == DMT.UOMSendingRevocation) {
+               } else if(spec == DMT.UOMSendingRevocation && 
source.isSearchable()) {
                        return node.nodeUpdater.uom.handleSendingRevocation(m, 
source);
-               } else if(spec == DMT.UOMRequestMain) {
+               } else if(spec == DMT.UOMRequestMain && source.isSearchable()) {
                        return node.nodeUpdater.uom.handleRequestMain(m, 
source);
-               } else if(spec == DMT.UOMSendingMain) {
+               } else if(spec == DMT.UOMSendingMain && source.isSearchable()) {
                        return node.nodeUpdater.uom.handleSendingMain(m, 
source);
-               } else if(spec == DMT.FNPOpennetAnnounceRequest) {
+               } else if(spec == DMT.FNPOpennetAnnounceRequest && 
source.isSearchable()) {
                        return handleAnnounceRequest(m, source);
                } else if(spec == DMT.FNPRoutingStatus) {
                        if(source instanceof DarknetPeerNode) {


Reply via email to