mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Merge pull request #673 from neutronscott/dev
check physical blacklist for interface binding as well
This commit is contained in:
commit
c2ffbb8627
1 changed files with 16 additions and 1 deletions
|
@ -2414,7 +2414,22 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
// Check global blacklists
|
||||||
|
const std::vector<InetAddress> *gbl = (const std::vector<InetAddress> *)0;
|
||||||
|
if (ifaddr.ss_family == AF_INET) {
|
||||||
|
gbl = &_globalV4Blacklist;
|
||||||
|
} else if (ifaddr.ss_family == AF_INET6) {
|
||||||
|
gbl = &_globalV6Blacklist;
|
||||||
|
}
|
||||||
|
if (gbl) {
|
||||||
|
Mutex::Lock _l(_localConfig_m);
|
||||||
|
for(std::vector<InetAddress>::const_iterator a(gbl->begin());a!=gbl->end();++a) {
|
||||||
|
if (a->containsAddress(ifaddr))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
Mutex::Lock _l(_nets_m);
|
Mutex::Lock _l(_nets_m);
|
||||||
for(std::map<uint64_t,NetworkState>::const_iterator n(_nets.begin());n!=_nets.end();++n) {
|
for(std::map<uint64_t,NetworkState>::const_iterator n(_nets.begin());n!=_nets.end();++n) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue