mirror of
https://github.com/monero-project/monero.git
synced 2025-08-17 15:30:27 -04:00
Merge pull request #9949
ac22479
Add is_same_host check to p2p (Lee *!* Clagett)
This commit is contained in:
commit
75ae1f33b4
1 changed files with 2 additions and 2 deletions
|
@ -1330,7 +1330,7 @@ namespace nodetool
|
|||
bool used = false;
|
||||
server->second.m_net_server.get_config_object().foreach_connection([&, is_public](const p2p_connection_context& cntxt)
|
||||
{
|
||||
if((is_public && cntxt.peer_id == peer.id) || (!cntxt.m_is_income && peer.adr == cntxt.m_remote_address))
|
||||
if((is_public && cntxt.peer_id == peer.id && peer.adr.is_same_host(cntxt.m_remote_address)) || (!cntxt.m_is_income && peer.adr == cntxt.m_remote_address))
|
||||
{
|
||||
used = true;
|
||||
return false;//stop enumerating
|
||||
|
@ -1355,7 +1355,7 @@ namespace nodetool
|
|||
bool used = false;
|
||||
server->second.m_net_server.get_config_object().foreach_connection([&, is_public](const p2p_connection_context& cntxt)
|
||||
{
|
||||
if((is_public && cntxt.peer_id == peer.id) || (!cntxt.m_is_income && peer.adr == cntxt.m_remote_address))
|
||||
if((is_public && cntxt.peer_id == peer.id && peer.adr.is_same_host(cntxt.m_remote_address)) || (!cntxt.m_is_income && peer.adr == cntxt.m_remote_address))
|
||||
{
|
||||
used = true;
|
||||
return false;//stop enumerating
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue