From e03102dbcb4d28cfa54740a8d9824d3c6324d97b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 14 Mar 2019 14:29:15 -0700 Subject: Clean out some unnecessarily pedantic auth stuff in favor of a simpler way of gating multicast gathers. --- node/Multicaster.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'node/Multicaster.cpp') diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index c38e2f02..67e133c0 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -42,8 +42,7 @@ namespace ZeroTier { Multicaster::Multicaster(const RuntimeEnvironment *renv) : RR(renv), - _groups(256), - _gatherAuth(256) + _groups(32) { } @@ -415,25 +414,6 @@ void Multicaster::clean(int64_t now) } } } - - { - Mutex::Lock _l(_gatherAuth_m); - _GatherAuthKey *k = (_GatherAuthKey *)0; - uint64_t *ts = NULL; - Hashtable<_GatherAuthKey,uint64_t>::Iterator i(_gatherAuth); - while (i.next(k,ts)) { - if ((now - *ts) >= ZT_MULTICAST_CREDENTIAL_EXPIRATON) - _gatherAuth.erase(*k); - } - } -} - -void Multicaster::addCredential(void *tPtr,const CertificateOfMembership &com,bool alreadyValidated) -{ - if ((alreadyValidated)||(com.verify(RR,tPtr) == 0)) { - Mutex::Lock _l(_gatherAuth_m); - _gatherAuth[_GatherAuthKey(com.networkId(),com.issuedTo())] = RR->node->now(); - } } void Multicaster::_add(void *tPtr,int64_t now,uint64_t nwid,const MulticastGroup &mg,MulticastGroupStatus &gs,const Address &member) -- cgit v1.2.3