Disconnect buggy clients automatically.
authorAlex <balthazar.ad@gmail.com>
Mon, 27 Jan 2014 01:36:28 +0000 (05:36 +0400)
committerMASM fan <masmfan@gmail.com>
Fri, 21 Feb 2014 07:56:45 +0000 (11:56 +0400)
src/main.cpp

index 4f10bfe..fa8e764 100644 (file)
@@ -3096,6 +3096,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             return true;
         }
 
+        if (pfrom->nVersion < 60010)
+        {
+            printf("partner %s using a buggy client %d, disconnecting\n", pfrom->addr.ToString().c_str(), pfrom->nVersion);
+            pfrom->fDisconnect = true;
+            return true;
+        }
+
         // record my external IP reported by peer
         if (addrFrom.IsRoutable() && addrMe.IsRoutable())
             addrSeenByPeer = addrMe;