diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-03-14 14:29:15 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-03-14 14:29:15 -0700 |
| commit | e03102dbcb4d28cfa54740a8d9824d3c6324d97b (patch) | |
| tree | a0da61347f8899b7aa93ab3e754f337151e936d8 /node/Multicaster.cpp | |
| parent | 9d7b7c72b2dd769853bea3423321539ab198829e (diff) | |
| download | infinitytier-e03102dbcb4d28cfa54740a8d9824d3c6324d97b.tar.gz infinitytier-e03102dbcb4d28cfa54740a8d9824d3c6324d97b.zip | |
Clean out some unnecessarily pedantic auth stuff in favor of a simpler way of gating multicast gathers.
Diffstat (limited to 'node/Multicaster.cpp')
| -rw-r--r-- | node/Multicaster.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
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) |
