aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2023-04-14 13:34:30 +0200
committerselsta <selsta@sent.at>2026-05-16 02:40:03 +0200
commit528cbac17a6c372d1698c82e30df0fdfc78a5ccc (patch)
tree00b2446c4c0437900d97fdc05e8d696ffecbd9c2 /src/cryptonote_protocol
parent86f0ed6a89e4c9747f035896ffc218dc73672134 (diff)
downloadmonzero-core-528cbac17a6c372d1698c82e30df0fdfc78a5ccc.tar.gz
monzero-core-528cbac17a6c372d1698c82e30df0fdfc78a5ccc.tar.xz
monzero-core-528cbac17a6c372d1698c82e30df0fdfc78a5ccc.zip
Show IPv6 addresses in connection list
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 6c36a3b5b..cc7e044f5 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -378,6 +378,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;