aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p2p/net_node.inl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 97a18b519..24c87cef8 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -166,7 +166,7 @@ namespace nodetool
const time_t now = time(nullptr);
// look in the hosts list
- auto it = m_blocked_hosts.find(address);
+ auto it = m_blocked_hosts.find(address.host_str());
if (it != m_blocked_hosts.end())
{
if (now >= it->second)
@@ -224,7 +224,7 @@ namespace nodetool
limit = std::numeric_limits<time_t>::max();
else
limit = now + seconds;
- m_blocked_hosts[addr] = limit;
+ m_blocked_hosts[addr.host_str()] = limit;
// drop any connection to that address. This should only have to look into
// the zone related to the connection, but really make sure everything is
@@ -254,7 +254,7 @@ namespace nodetool
bool node_server<t_payload_net_handler>::unblock_host(const epee::net_utils::network_address &address)
{
CRITICAL_REGION_LOCAL(m_blocked_hosts_lock);
- auto i = m_blocked_hosts.find(address);
+ auto i = m_blocked_hosts.find(address.host_str());
if (i == m_blocked_hosts.end())
return false;
m_blocked_hosts.erase(i);
@@ -1342,7 +1342,7 @@ namespace nodetool
bool node_server<t_payload_net_handler>::is_addr_recently_failed(const epee::net_utils::network_address& addr)
{
CRITICAL_REGION_LOCAL(m_conn_fails_cache_lock);
- auto it = m_conn_fails_cache.find(addr);
+ auto it = m_conn_fails_cache.find(addr.host_str());
if(it == m_conn_fails_cache.end())
return false;