aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-05 16:21:59 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-11-19 08:07:16 +0100
commitfaaad1bbac46cfeb22654b4c59f0aac7a680c03a (patch)
tree1427b40e7258de136ad78d1933ff061b76e25bb6 /src/net_processing.cpp
parentfad68afcff731153d1c83f7f56c91ecbb264b59a (diff)
p2p: Ignore version msgs after initial version msg
Sending a version message after the intial version message is peer misbehavior. Though, it seems arbitrary and confusing to disconnect only after exactly 100 version messages. Duplicate version messages affect us no different than any other unknown message. So remove the Misbehaving and ignore the redundant msgs.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index df97d0e2e7..f21fb8a49b 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2286,10 +2286,8 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
if (peer == nullptr) return;
if (msg_type == NetMsgType::VERSION) {
- // Each connection can only send one version message
- if (pfrom.nVersion != 0)
- {
- Misbehaving(pfrom.GetId(), 1, "redundant version message");
+ if (pfrom.nVersion != 0) {
+ LogPrint(BCLog::NET, "redundant version message from peer=%d\n", pfrom.GetId());
return;
}