From 73ca9b6373a758bcba7d589064dd2cfb27208d3a Mon Sep 17 00:00:00 2001 From: neutronscott Date: Sat, 3 Feb 2018 14:53:46 -0500 Subject: [PATCH] check physical blacklist for interface binding as well --- service/OneService.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index 27b71141e..250e4b382 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -2414,7 +2414,22 @@ public: return false; } } - + { + // Check global blacklists + const std::vector *gbl = (const std::vector *)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::const_iterator a(gbl->begin());a!=gbl->end();++a) { + if (a->containsAddress(ifaddr)) + return false; + } + } + } { Mutex::Lock _l(_nets_m); for(std::map::const_iterator n(_nets.begin());n!=_nets.end();++n) {