aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2019-04-05 13:35:15 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2019-09-04 14:58:36 -0400
commit430f489027f15c1e4948ea4378954df24e3fee88 (patch)
treee0e8a8e4c9c1fc30957473e8072042b5e92c9160 /src/net.cpp
parent3a5e885306ea954d7eccdc11502e91a51dab8ec6 (diff)
Don't relay addr messages to block-relay-only peers
We don't want relay of addr messages to leak information about these network links.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e589b940ad..b44048cbce 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2647,6 +2647,10 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
fInbound(fInboundIn),
nKeyedNetGroup(nKeyedNetGroupIn),
addrKnown(5000, 0.001),
+ // Don't relay addr messages to peers that we connect to as block-relay-only
+ // peers (to prevent adversaries from inferring these links from addr
+ // traffic).
+ m_addr_relay_peer(!block_relay_only),
id(idIn),
nLocalHostNonce(nLocalHostNonceIn),
nLocalServices(nLocalServicesIn),