diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-04 08:46:12 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-04 08:46:12 -0700 |
commit | 5ad120208f4d9864952b2ce8b3e62293421e9c10 (patch) | |
tree | 2119be44ccc2fe33d224a73cc5c69484390334fc /node/Membership.hpp | |
parent | b48a70db2e2639bef81941b17c4f3268c41d2a9f (diff) | |
download | infinitytier-5ad120208f4d9864952b2ce8b3e62293421e9c10.tar.gz infinitytier-5ad120208f4d9864952b2ce8b3e62293421e9c10.zip |
Small fix, should filter by temporal validity.
Diffstat (limited to 'node/Membership.hpp')
-rw-r--r-- | node/Membership.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/node/Membership.hpp b/node/Membership.hpp index 22772859..0bc8f335 100644 --- a/node/Membership.hpp +++ b/node/Membership.hpp @@ -244,21 +244,25 @@ public: _hti(m._remoteCaps), _k((uint32_t *)0), _c((Capability *)0), + _m(m), _nconf(nconf) { } inline Capability *next() { - if (_hti.next(_k,_c)) - return _c; - else return (Capability *)0; + while (_hti.next(_k,_c)) { + if (_m._isCredentialTimestampValid(_nconf,*_c)) + return _c; + } + return (Capability *)0; } private: Hashtable< uint32_t,Capability >::Iterator _hti; uint32_t *_k; Capability *_c; + Membership &_m; const NetworkConfig &_nconf; }; }; |