diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-06-15 18:26:32 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-06-15 18:26:32 +0000 |
commit | e5681bb12154bae75977d091190e924d8e6984cd (patch) | |
tree | 6bd0c2671065191db077713ab84b8e7832954ba5 /main.cpp | |
parent | bed005b639a0db8c8d98022609fe03e0ec55e18a (diff) |
more addr message error checkingv0.2.11
-- version 0.2.11
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@83 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1926,7 +1926,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) {
vector<CAddress> vAddr;
vRecv >> vAddr;
- if (vAddr.size() > 50000) // lower this to 1000 later
+ if (pfrom->nVersion < 200) // don't want addresses from 0.1.5
+ return true;
+ if (vAddr.size() > 1000)
return error("message addr size() = %d", vAddr.size());
// Store the new addresses
@@ -2311,6 +2313,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) if (pto->setAddrKnown.insert(addr).second)
{
vAddr.push_back(addr);
+ // receiver rejects addr messages larger than 1000
if (vAddr.size() >= 1000)
{
pto->PushMessage("addr", vAddr);
|