diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-04 18:43:24 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-04 18:43:24 -0700 |
commit | 59fa68783054ace53aec4fc942a31c332e97a761 (patch) | |
tree | 374fecdbd2d0d22cfa38e077487e7d7dd06f436e | |
parent | e922324bc61f3d4fd96c66f628d3b84d50551cec (diff) | |
download | infinitytier-59fa68783054ace53aec4fc942a31c332e97a761.tar.gz infinitytier-59fa68783054ace53aec4fc942a31c332e97a761.zip |
Make timeout also apply to null check in iam()
-rw-r--r-- | node/SelfAwareness.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/SelfAwareness.cpp b/node/SelfAwareness.cpp index 1e1f09f7..9f57cc69 100644 --- a/node/SelfAwareness.cpp +++ b/node/SelfAwareness.cpp @@ -96,7 +96,7 @@ void SelfAwareness::iam(const Address &reporter,const InetAddress &reporterPhysi PhySurfaceEntry &entry = _phy[PhySurfaceKey(reporter,scope)]; - if (!entry.ts) { + if ((now - entry.ts) >= ZT_SELFAWARENESS_ENTRY_TIMEOUT) { entry.mySurface = myPhysicalAddress; entry.ts = now; TRACE("learned physical address %s for scope %u as seen from %s(%s) (replaced <null>)",myPhysicalAddress.toString().c_str(),(unsigned int)scope,reporter.toString().c_str(),reporterPhysicalAddress.toString().c_str()); |