|
|
|
@ -700,28 +700,14 @@ namespace data
@@ -700,28 +700,14 @@ namespace data
|
|
|
|
|
{ |
|
|
|
|
if (IsV6 ()) |
|
|
|
|
{ |
|
|
|
|
// NTCP
|
|
|
|
|
m_SupportedTransports &= ~eNTCPV6; |
|
|
|
|
for (size_t i = 0; i < m_Addresses->size (); i++) |
|
|
|
|
m_SupportedTransports &= ~(eNTCPV6 | eSSUV6); |
|
|
|
|
for (auto it = m_Addresses->begin (); it != m_Addresses->end ();) |
|
|
|
|
{ |
|
|
|
|
if ((*m_Addresses)[i]->transportStyle == i2p::data::RouterInfo::eTransportNTCP && |
|
|
|
|
(*m_Addresses)[i]->host.is_v6 ()) |
|
|
|
|
{ |
|
|
|
|
m_Addresses->erase (m_Addresses->begin () + i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// SSU
|
|
|
|
|
m_SupportedTransports &= ~eSSUV6; |
|
|
|
|
for (size_t i = 0; i < m_Addresses->size (); i++) |
|
|
|
|
{ |
|
|
|
|
if ((*m_Addresses)[i]->transportStyle == i2p::data::RouterInfo::eTransportSSU && |
|
|
|
|
(*m_Addresses)[i]->host.is_v6 ()) |
|
|
|
|
{ |
|
|
|
|
m_Addresses->erase (m_Addresses->begin () + i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
auto addr = *it; |
|
|
|
|
if (addr->host.is_v6 ()) |
|
|
|
|
it = m_Addresses->erase (it); |
|
|
|
|
else |
|
|
|
|
it++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -730,28 +716,14 @@ namespace data
@@ -730,28 +716,14 @@ namespace data
|
|
|
|
|
{ |
|
|
|
|
if (IsV4 ()) |
|
|
|
|
{ |
|
|
|
|
// NTCP
|
|
|
|
|
m_SupportedTransports &= ~eNTCPV4; |
|
|
|
|
for (size_t i = 0; i < m_Addresses->size (); i++) |
|
|
|
|
m_SupportedTransports &= ~(eNTCPV4 | eSSUV4); |
|
|
|
|
for (auto it = m_Addresses->begin (); it != m_Addresses->end ();) |
|
|
|
|
{ |
|
|
|
|
if ((*m_Addresses)[i]->transportStyle == i2p::data::RouterInfo::eTransportNTCP && |
|
|
|
|
(*m_Addresses)[i]->host.is_v4 ()) |
|
|
|
|
{ |
|
|
|
|
m_Addresses->erase (m_Addresses->begin () + i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// SSU
|
|
|
|
|
m_SupportedTransports &= ~eSSUV4; |
|
|
|
|
for (size_t i = 0; i < m_Addresses->size (); i++) |
|
|
|
|
{ |
|
|
|
|
if ((*m_Addresses)[i]->transportStyle == i2p::data::RouterInfo::eTransportSSU && |
|
|
|
|
(*m_Addresses)[i]->host.is_v4 ()) |
|
|
|
|
{ |
|
|
|
|
m_Addresses->erase (m_Addresses->begin () + i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
auto addr = *it; |
|
|
|
|
if (addr->host.is_v4 ()) |
|
|
|
|
it = m_Addresses->erase (it); |
|
|
|
|
else |
|
|
|
|
it++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|