diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-05-06 16:13:11 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-05-06 16:13:11 -0700 |
| commit | 8b9519f0af8e89ad49e730546abdc2ff94fd2ef8 (patch) | |
| tree | ed55bee33eadfd08c96e4c0688b577b13912a1af /node/Node.cpp | |
| parent | 529515d1d173e6850c86230106cbfc36e1b9bf97 (diff) | |
| download | infinitytier-8b9519f0af8e89ad49e730546abdc2ff94fd2ef8.tar.gz infinitytier-8b9519f0af8e89ad49e730546abdc2ff94fd2ef8.zip | |
Simplify a bunch of NetworkConfig stuff by eliminating accessors, also makes network controller easier to refactor.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 698f23c3..bedbba94 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -677,11 +677,9 @@ bool Node::shouldUsePathForZeroTierTraffic(const InetAddress &localAddress,const Mutex::Lock _l(_networks_m); for(std::vector< std::pair< uint64_t, SharedPtr<Network> > >::const_iterator i=_networks.begin();i!=_networks.end();++i) { if (i->second->hasConfig()) { - std::vector<InetAddress> sips(i->second->config().staticIps()); - for(std::vector<InetAddress>::const_iterator a(sips.begin());a!=sips.end();++a) { - if (a->containsAddress(remoteAddress)) { + for(unsigned int k=0;k<i->second->config().staticIpCount;++k) { + if (i->second->config().staticIps[k].containsAddress(remoteAddress)) return false; - } } } } |
