summaryrefslogtreecommitdiff
path: root/node/Topology.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:11:25 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:11:25 -0700
commitb9dba97fdb8644e3c427b079d81ed9db3697bf1b (patch)
tree866cc433049cfdcb3c5e939e7493c3822bc44bb2 /node/Topology.cpp
parent25a5275921678e9048a4bc0e1827f0235894c0bf (diff)
downloadinfinitytier-b9dba97fdb8644e3c427b079d81ed9db3697bf1b.tar.gz
infinitytier-b9dba97fdb8644e3c427b079d81ed9db3697bf1b.zip
Bunch more refactoring for an even more compact NetworkConfig representation, especially rules.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r--node/Topology.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp
index 21ed78a7..4105eae9 100644
--- a/node/Topology.cpp
+++ b/node/Topology.cpp
@@ -284,11 +284,8 @@ bool Topology::isUpstream(const Identity &id) const
return true;
std::vector< SharedPtr<Network> > nws(RR->node->allNetworks());
for(std::vector< SharedPtr<Network> >::const_iterator nw(nws.begin());nw!=nws.end();++nw) {
- if ((*nw)->hasConfig()) {
- for(unsigned int r=0;r<(*nw)->config().staticDeviceCount();++r) {
- if ((((*nw)->config().staticDevice(r).flags & ZT_NETWORK_STATIC_DEVICE_IS_RELAY) != 0)&&((*nw)->config().staticDevice(r).address == id.address().toInt()))
- return true;
- }
+ if ((*nw)->config().isRelay(id.address())) {
+ return true;
}
}
return false;