mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-15 05:38:18 +00:00
Bunch more refactoring for an even more compact NetworkConfig representation, especially rules.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user