Browse Source

eligble floodfill must be reachable by ipv4

pull/1677/head
orignal 3 years ago
parent
commit
f4902e6642
  1. 5
      libi2pd/RouterInfo.cpp
  2. 2
      libi2pd/RouterInfo.h

5
libi2pd/RouterInfo.cpp

@ -1163,9 +1163,8 @@ namespace data
bool RouterInfo::IsEligibleFloodfill () const bool RouterInfo::IsEligibleFloodfill () const
{ {
// floodfill must be reachable somehow, >= 0.9.28 and not DSA // floodfill must be reachable by ipv4, >= 0.9.28 and not DSA
return (IsReachable () || (m_SupportedTransports & eSSUV4)) && return IsReachableBy (eNTCP2V4 | eSSUV4) && m_Version >= NETDB_MIN_FLOODFILL_VERSION &&
m_Version >= NETDB_MIN_FLOODFILL_VERSION &&
GetIdentity ()->GetSigningKeyType () != SIGNING_KEY_TYPE_DSA_SHA1; GetIdentity ()->GetSigningKeyType () != SIGNING_KEY_TYPE_DSA_SHA1;
} }

2
libi2pd/RouterInfo.h

@ -206,7 +206,7 @@ namespace data
void DisableMesh (); void DisableMesh ();
bool IsCompatible (const RouterInfo& other) const { return m_SupportedTransports & other.m_SupportedTransports; }; bool IsCompatible (const RouterInfo& other) const { return m_SupportedTransports & other.m_SupportedTransports; };
bool IsReachableFrom (const RouterInfo& other) const { return m_ReachableTransports & other.m_SupportedTransports; }; bool IsReachableFrom (const RouterInfo& other) const { return m_ReachableTransports & other.m_SupportedTransports; };
bool IsReachableBy (SupportedTransports transport) const { return m_ReachableTransports & transport; }; bool IsReachableBy (uint8_t transports) const { return m_ReachableTransports & transports; };
bool HasValidAddresses () const { return m_SupportedTransports; }; bool HasValidAddresses () const { return m_SupportedTransports; };
bool IsHidden () const { return m_Caps & eHidden; }; bool IsHidden () const { return m_Caps & eHidden; };
bool IsHighBandwidth () const { return m_Caps & RouterInfo::eHighBandwidth; }; bool IsHighBandwidth () const { return m_Caps & RouterInfo::eHighBandwidth; };

Loading…
Cancel
Save