|
|
@ -1057,21 +1057,29 @@ namespace data |
|
|
|
for (const auto& addr: *m_Addresses) |
|
|
|
for (const auto& addr: *m_Addresses) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint8_t transports = 0; |
|
|
|
uint8_t transports = 0; |
|
|
|
if (addr->transportStyle == eTransportNTCP) |
|
|
|
switch (addr->transportStyle) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (addr->IsV4 ()) transports |= eNTCP2V4; |
|
|
|
case eTransportNTCP: |
|
|
|
if (addr->IsV6 ()) |
|
|
|
if (addr->IsV4 ()) transports |= eNTCP2V4; |
|
|
|
transports |= (i2p::util::net::IsYggdrasilAddress (addr->host) ? eNTCP2V6Mesh : eNTCP2V6); |
|
|
|
if (addr->IsV6 ()) |
|
|
|
if (addr->IsPublishedNTCP2 ()) |
|
|
|
transports |= (i2p::util::net::IsYggdrasilAddress (addr->host) ? eNTCP2V6Mesh : eNTCP2V6); |
|
|
|
m_ReachableTransports |= transports; |
|
|
|
if (addr->IsPublishedNTCP2 ()) |
|
|
|
} |
|
|
|
m_ReachableTransports |= transports; |
|
|
|
else if (addr->transportStyle == eTransportSSU) |
|
|
|
break; |
|
|
|
{ |
|
|
|
case eTransportSSU: |
|
|
|
if (addr->IsV4 ()) transports |= eSSUV4; |
|
|
|
if (addr->IsV4 ()) transports |= eSSUV4; |
|
|
|
if (addr->IsV6 ()) transports |= eSSUV6; |
|
|
|
if (addr->IsV6 ()) transports |= eSSUV6; |
|
|
|
if (addr->IsReachableSSU ()) |
|
|
|
if (addr->IsReachableSSU ()) |
|
|
|
m_ReachableTransports |= transports; |
|
|
|
m_ReachableTransports |= transports; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case eTransportSSU2: |
|
|
|
|
|
|
|
if (addr->IsV4 ()) transports |= eSSU2V4; |
|
|
|
|
|
|
|
if (addr->IsV6 ()) transports |= eSSU2V6; |
|
|
|
|
|
|
|
if (addr->IsReachableSSU ()) |
|
|
|
|
|
|
|
m_ReachableTransports |= transports; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: ; |
|
|
|
|
|
|
|
} |
|
|
|
m_SupportedTransports |= transports; |
|
|
|
m_SupportedTransports |= transports; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|