set reachable/unreachable for v4 only

This commit is contained in:
orignal 2016-07-14 14:29:45 -04:00
parent d98d091c43
commit caf7da1053

View File

@ -226,7 +226,8 @@ namespace i2p
auto& addresses = m_RouterInfo.GetAddresses ();
for (auto it = addresses.begin (); it != addresses.end (); it++)
{
if ((*it)->transportStyle == i2p::data::RouterInfo::eTransportNTCP)
if ((*it)->transportStyle == i2p::data::RouterInfo::eTransportNTCP &&
(*it)->host.is_v4 ())
{
addresses.erase (it);
break;
@ -255,7 +256,8 @@ namespace i2p
auto& addresses = m_RouterInfo.GetAddresses ();
for (auto addr : addresses)
{
if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU)
if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU &&
addr->host.is_v4 ())
{
// insert NTCP address with host/port from SSU
m_RouterInfo.AddNTCPAddress (addr->host.to_string ().c_str (), addr->port);