mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-16 10:03:14 -07:00
Backport only the COM mitigation instead of everything from 1.8
This commit is contained in:
parent
75a45eeb27
commit
eabe091038
7 changed files with 75 additions and 202 deletions
|
@ -91,13 +91,14 @@ public:
|
|||
* Check whether the peer represented by this Membership should be allowed on this network at all
|
||||
*
|
||||
* @param nconf Our network config
|
||||
* @param otherNodeIdentity Identity of remote node
|
||||
* @return True if this peer is allowed on this network at all
|
||||
*/
|
||||
inline bool isAllowedOnNetwork(const NetworkConfig &nconf) const
|
||||
inline bool isAllowedOnNetwork(const NetworkConfig &thisNodeNetworkConfig, const Identity &otherNodeIdentity) const
|
||||
{
|
||||
if (nconf.isPublic()) return true;
|
||||
if (thisNodeNetworkConfig.isPublic()) return true;
|
||||
if (_com.timestamp() <= _comRevocationThreshold) return false;
|
||||
return nconf.com.agreesWith(_com);
|
||||
return thisNodeNetworkConfig.com.agreesWith(_com, otherNodeIdentity);
|
||||
}
|
||||
|
||||
inline bool recentlyAssociated(const int64_t now) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue