Browse Source

set reachable/unreachable for v4 only

pull/576/head
orignal 8 years ago
parent
commit
caf7da1053
  1. 6
      RouterContext.cpp

6
RouterContext.cpp

@ -226,7 +226,8 @@ namespace i2p
auto& addresses = m_RouterInfo.GetAddresses (); auto& addresses = m_RouterInfo.GetAddresses ();
for (auto it = addresses.begin (); it != addresses.end (); it++) 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); addresses.erase (it);
break; break;
@ -255,7 +256,8 @@ namespace i2p
auto& addresses = m_RouterInfo.GetAddresses (); auto& addresses = m_RouterInfo.GetAddresses ();
for (auto addr : addresses) 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 // insert NTCP address with host/port from SSU
m_RouterInfo.AddNTCPAddress (addr->host.to_string ().c_str (), addr->port); m_RouterInfo.AddNTCPAddress (addr->host.to_string ().c_str (), addr->port);

Loading…
Cancel
Save