diff options
author | Grant Limberg <glimberg@gmail.com> | 2015-08-01 11:52:47 -0700 |
---|---|---|
committer | Grant Limberg <glimberg@gmail.com> | 2015-08-01 11:52:47 -0700 |
commit | 0fd6808e21755e55603f99086e28b47fe1348f04 (patch) | |
tree | b37c08ca4c3073c4c65a9849335d03476501c970 /node | |
parent | c9b4028cd32e940a3ccd1c44cb6ebcf850e145d0 (diff) | |
parent | bf193dd3cfee7c343c5efd7b06df034d8b731d47 (diff) | |
download | infinitytier-0fd6808e21755e55603f99086e28b47fe1348f04.tar.gz infinitytier-0fd6808e21755e55603f99086e28b47fe1348f04.zip |
Merge branch 'master' into android-jni
Diffstat (limited to 'node')
-rw-r--r-- | node/Network.cpp | 2 | ||||
-rw-r--r-- | node/Node.hpp | 3 | ||||
-rw-r--r-- | node/Peer.cpp | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/node/Network.cpp b/node/Network.cpp index 549219d7..39042fab 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -533,7 +533,7 @@ public: inline void operator()(Topology &t,const SharedPtr<Peer> &p) { - if ( ( (p->hasActiveDirectPath(_now)) && (_network->_isAllowed(p->address())) ) || (std::find(_rootAddresses.begin(),_rootAddresses.end(),p->address()) != _rootAddresses.end()) ) { + if ( ( (p->hasActiveDirectPath(_now)) && ( (_network->_isAllowed(p->address())) || (p->address() == _network->controller()) ) ) || (std::find(_rootAddresses.begin(),_rootAddresses.end(),p->address()) != _rootAddresses.end()) ) { Packet outp(p->address(),RR->identity.address(),Packet::VERB_MULTICAST_LIKE); for(std::vector<MulticastGroup>::iterator mg(_allMulticastGroups.begin());mg!=_allMulticastGroups.end();++mg) { diff --git a/node/Node.hpp b/node/Node.hpp index 0e966aa6..2a283eab 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -248,9 +248,6 @@ private: ZT1_VirtualNetworkConfigFunction _virtualNetworkConfigFunction; ZT1_EventCallback _eventCallback; - //Dictionary _localConfig; // persisted as local.conf - //Mutex _localConfig_m; - std::vector< std::pair< uint64_t, SharedPtr<Network> > > _networks; Mutex _networks_m; diff --git a/node/Peer.cpp b/node/Peer.cpp index 3cf0ec4e..c27afa8f 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -133,7 +133,7 @@ void Peer::received( Packet outp(_id.address(),RR->identity.address(),Packet::VERB_MULTICAST_LIKE); const std::vector< SharedPtr<Network> > networks(RR->node->allNetworks()); for(std::vector< SharedPtr<Network> >::const_iterator n(networks.begin());n!=networks.end();++n) { - if ( (isRoot) || ((*n)->isAllowed(_id.address())) ) { + if ( (isRoot) || ((*n)->isAllowed(_id.address())) || (_id.address() == (*n)->controller()) ) { const std::vector<MulticastGroup> mgs((*n)->allMulticastGroups()); for(std::vector<MulticastGroup>::const_iterator mg(mgs.begin());mg!=mgs.end();++mg) { if ((outp.size() + 18) > ZT_UDP_DEFAULT_PAYLOAD_MTU) { @@ -211,7 +211,7 @@ void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &at void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now) { RemotePath *const bestPath = getBestPath(now); - if ((bestPath)&&(bestPath->active(now))) { + if (bestPath) { if ((now - bestPath->lastReceived()) >= ZT_PEER_DIRECT_PING_DELAY) { TRACE("PING %s(%s)",_id.address().toString().c_str(),bestPath->address().toString().c_str()); attemptToContactAt(RR,bestPath->address(),now); @@ -239,7 +239,7 @@ void Peer::pushDirectPaths(const RuntimeEnvironment *RR,RemotePath *path,uint64_ ps.push_back(','); ps.append(p->address().toString()); } - TRACE("pushing %u direct paths (local interface addresses) to %s: %s",(unsigned int)dps.size(),_id.address().toString().c_str(),ps.c_str()); + TRACE("pushing %u direct paths to %s: %s",(unsigned int)dps.size(),_id.address().toString().c_str(),ps.c_str()); } #endif |