Show IPv6 addresses in connection list

This commit is contained in:
Guillaume Le Vaillant 2023-04-14 13:34:30 +02:00
parent 9367b432f6
commit c90c1c3fe1
3 changed files with 16 additions and 4 deletions

View file

@ -281,6 +281,11 @@ namespace cryptonote
cnx.ip = cnx.host;
cnx.port = std::to_string(cntxt.m_remote_address.as<epee::net_utils::ipv4_network_address>().port());
}
else if (cntxt.m_remote_address.get_type_id() == epee::net_utils::ipv6_network_address::get_type_id())
{
cnx.ip = cnx.host;
cnx.port = std::to_string(cntxt.m_remote_address.as<epee::net_utils::ipv6_network_address>().port());
}
cnx.rpc_port = cntxt.m_rpc_port;
cnx.rpc_credits_per_hash = cntxt.m_rpc_credits_per_hash;