From 8b9519f0af8e89ad49e730546abdc2ff94fd2ef8 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 6 May 2016 16:13:11 -0700 Subject: Simplify a bunch of NetworkConfig stuff by eliminating accessors, also makes network controller easier to refactor. --- node/Node.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'node/Node.cpp') 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 > >::const_iterator i=_networks.begin();i!=_networks.end();++i) { if (i->second->hasConfig()) { - std::vector sips(i->second->config().staticIps()); - for(std::vector::const_iterator a(sips.begin());a!=sips.end();++a) { - if (a->containsAddress(remoteAddress)) { + for(unsigned int k=0;ksecond->config().staticIpCount;++k) { + if (i->second->config().staticIps[k].containsAddress(remoteAddress)) return false; - } } } } -- cgit v1.2.3