From 430f489027f15c1e4948ea4378954df24e3fee88 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 5 Apr 2019 13:35:15 -0400 Subject: 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. --- src/net.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net.cpp') 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), -- cgit v1.2.3