mirror of
https://github.com/monero-project/monero.git
synced 2026-01-08 19:31:07 -08:00
Merge pull request #5916
7b076d5 p2p: fix bans taking port into account (moneromooo-monero)
This commit is contained in:
@@ -1985,12 +1985,12 @@ namespace cryptonote
|
||||
PERF_TIMER(on_get_bans);
|
||||
|
||||
auto now = time(nullptr);
|
||||
std::map<epee::net_utils::network_address, time_t> blocked_hosts = m_p2p.get_blocked_hosts();
|
||||
for (std::map<epee::net_utils::network_address, time_t>::const_iterator i = blocked_hosts.begin(); i != blocked_hosts.end(); ++i)
|
||||
std::map<std::string, time_t> blocked_hosts = m_p2p.get_blocked_hosts();
|
||||
for (std::map<std::string, time_t>::const_iterator i = blocked_hosts.begin(); i != blocked_hosts.end(); ++i)
|
||||
{
|
||||
if (i->second > now) {
|
||||
COMMAND_RPC_GETBANS::ban b;
|
||||
b.host = i->first.host_str();
|
||||
b.host = i->first;
|
||||
b.ip = 0;
|
||||
uint32_t ip;
|
||||
if (epee::string_tools::get_ip_int32_from_string(ip, b.host))
|
||||
|
||||
Reference in New Issue
Block a user