aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-12-19 17:24:21 -0600
committerluigi1111 <luigi1111w@gmail.com>2020-12-19 17:24:21 -0600
commit0dac64afb3d9073627c300044e2c4fc9bd8bbcc0 (patch)
tree3c78cc6a2cf960239d7aa92ebd2d899ae695d9d0 /src/p2p
parentMerge pull request #7141 (diff)
parentp2p: ignore incoming peer list entries when we have them blocked (diff)
downloadmonero-0dac64afb3d9073627c300044e2c4fc9bd8bbcc0.tar.xz
Merge pull request #7143
58651d1 p2p: ignore incoming peer list entries when we have them blocked (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.inl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 28001f6d5..ab098b7d4 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -2087,7 +2087,9 @@ namespace nodetool
LOG_DEBUG_CC(context, "REMOTE PEERLIST: remote peerlist size=" << peerlist_.size());
LOG_TRACE_CC(context, "REMOTE PEERLIST: " << ENDL << print_peerlist_to_string(peerlist_));
- return m_network_zones.at(context.m_remote_address.get_zone()).m_peerlist.merge_peerlist(peerlist_, [this](const peerlist_entry &pe) { return !is_addr_recently_failed(pe.adr); });
+ return m_network_zones.at(context.m_remote_address.get_zone()).m_peerlist.merge_peerlist(peerlist_, [this](const peerlist_entry &pe) {
+ return !is_addr_recently_failed(pe.adr) && is_remote_host_allowed(pe.adr);
+ });
}
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>