diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-02 14:40:26 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-02 14:40:26 -0700 |
| commit | 91940cbcf52c6b09f343e365632b8a1701732099 (patch) | |
| tree | 7312b67871a97d8a1edf97501f3621606bb7ec84 /node/Node.cpp | |
| parent | 77bd8aacd1bb17cd9c2213ffb4dd455330e587e0 (diff) | |
| download | infinitytier-91940cbcf52c6b09f343e365632b8a1701732099.tar.gz infinitytier-91940cbcf52c6b09f343e365632b8a1701732099.zip | |
Kill network preferred relays -- this feature is gone (and was seldom used anyway) in favor of federation.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 13085028..e5d04e31 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -173,11 +173,10 @@ ZT_ResultCode Node::processVirtualNetworkFrame( class _PingPeersThatNeedPing { public: - _PingPeersThatNeedPing(const RuntimeEnvironment *renv,uint64_t now,const std::vector<NetworkConfig::Relay> &relays) : + _PingPeersThatNeedPing(const RuntimeEnvironment *renv,uint64_t now) : lastReceiveFromUpstream(0), RR(renv), _now(now), - _relays(relays), _world(RR->topology->world()) { } @@ -214,17 +213,6 @@ public: // flapping in Cluster mode. if (RR->topology->amRoot()) return; - - // Check for network preferred relays, also considered 'upstream' and thus always - // pinged to keep links up. If they have stable addresses we will try them there. - for(std::vector<NetworkConfig::Relay>::const_iterator r(_relays.begin());r!=_relays.end();++r) { - if (r->address == p->address()) { - stableEndpoint4 = r->phy4; - stableEndpoint6 = r->phy6; - upstream = true; - break; - } - } } if (upstream) { @@ -267,7 +255,6 @@ public: private: const RuntimeEnvironment *RR; uint64_t _now; - const std::vector<NetworkConfig::Relay> &_relays; World _world; }; @@ -283,7 +270,6 @@ ZT_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *nextB _lastPingCheck = now; // Get relays and networks that need config without leaving the mutex locked - std::vector< NetworkConfig::Relay > networkRelays; std::vector< SharedPtr<Network> > needConfig; { Mutex::Lock _l(_networks_m); @@ -291,10 +277,6 @@ ZT_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *nextB if (((now - n->second->lastConfigUpdate()) >= ZT_NETWORK_AUTOCONF_DELAY)||(!n->second->hasConfig())) { needConfig.push_back(n->second); } - if (n->second->hasConfig()) { - std::vector<NetworkConfig::Relay> r(n->second->config().relays()); - networkRelays.insert(networkRelays.end(),r.begin(),r.end()); - } } } @@ -303,7 +285,7 @@ ZT_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *nextB (*n)->requestConfiguration(); // Do pings and keepalives - _PingPeersThatNeedPing pfunc(RR,now,networkRelays); + _PingPeersThatNeedPing pfunc(RR,now); RR->topology->eachPeer<_PingPeersThatNeedPing &>(pfunc); // Update online status, post status change as event |
