Disconnect buggy clients automatically.
authorAlex <balthazar.ad@gmail.com>
Mon, 27 Jan 2014 01:36:28 +0000 (05:36 +0400)
committerAlex <balthazar.ad@gmail.com>
Mon, 27 Jan 2014 01:36:28 +0000 (05:36 +0400)
src/main.cpp

index ccfd0aa..1abc1d3 100644 (file)
@@ -3343,6 +3343,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;