|
|
@ -457,6 +457,8 @@ namespace i2p |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RouterContext::SetUnreachable (bool v4, bool v6) |
|
|
|
void RouterContext::SetUnreachable (bool v4, bool v6) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (v4) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// set caps
|
|
|
|
// set caps
|
|
|
|
uint8_t caps = m_RouterInfo.GetCaps (); |
|
|
|
uint8_t caps = m_RouterInfo.GetCaps (); |
|
|
@ -464,6 +466,7 @@ namespace i2p |
|
|
|
caps |= i2p::data::RouterInfo::eUnreachable; |
|
|
|
caps |= i2p::data::RouterInfo::eUnreachable; |
|
|
|
caps &= ~i2p::data::RouterInfo::eFloodfill; // can't be floodfill
|
|
|
|
caps &= ~i2p::data::RouterInfo::eFloodfill; // can't be floodfill
|
|
|
|
m_RouterInfo.SetCaps (caps); |
|
|
|
m_RouterInfo.SetCaps (caps); |
|
|
|
|
|
|
|
} |
|
|
|
uint16_t port = 0; |
|
|
|
uint16_t port = 0; |
|
|
|
// delete previous introducers
|
|
|
|
// delete previous introducers
|
|
|
|
auto& addresses = m_RouterInfo.GetAddresses (); |
|
|
|
auto& addresses = m_RouterInfo.GetAddresses (); |
|
|
@ -484,6 +487,8 @@ namespace i2p |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RouterContext::SetReachable (bool v4, bool v6) |
|
|
|
void RouterContext::SetReachable (bool v4, bool v6) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (v4) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// update caps
|
|
|
|
// update caps
|
|
|
|
uint8_t caps = m_RouterInfo.GetCaps (); |
|
|
|
uint8_t caps = m_RouterInfo.GetCaps (); |
|
|
@ -492,6 +497,7 @@ namespace i2p |
|
|
|
if (m_IsFloodfill) |
|
|
|
if (m_IsFloodfill) |
|
|
|
caps |= i2p::data::RouterInfo::eFloodfill; |
|
|
|
caps |= i2p::data::RouterInfo::eFloodfill; |
|
|
|
m_RouterInfo.SetCaps (caps); |
|
|
|
m_RouterInfo.SetCaps (caps); |
|
|
|
|
|
|
|
} |
|
|
|
uint16_t port = 0; |
|
|
|
uint16_t port = 0; |
|
|
|
// delete previous introducers
|
|
|
|
// delete previous introducers
|
|
|
|
auto& addresses = m_RouterInfo.GetAddresses (); |
|
|
|
auto& addresses = m_RouterInfo.GetAddresses (); |
|
|
|