From 2e1bc6e500be4b7bdec3304245c8d19ab186a97c Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 9 Jan 2018 09:59:55 -0800 Subject: Cleaned up old code for attempted fix for ticket #600 --- osdep/ManagedRoute.cpp | 25 ------------------------- service/OneService.cpp | 1 + 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 8ffbed2a..d7c80704 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -477,31 +477,6 @@ bool ManagedRoute::sync() } } - // Detect routes previously applied by ZT that don't exist in the system's route list. Re-apply these. - // NOTE: The following block was added in reaction to the macOS High Sierra 10.13.2 disappearing - // route issue. This comment should be removed once we're sure this block doesn't have any side-effects. - /* - - // Commented out temporarily to test more generalized fix - - bool found = false; - std::vector<_RTE> currRoutes(_getRTEs(_target,false)); - for(std::vector<_RTE>::iterator r(currRoutes.begin());r!=currRoutes.end();++r) { - if(_target == r->target) { - found = true; - break; - } - } - if (!found) { - // erase _applied enteries - std::map::iterator rt; - rt = _applied.find(leftt); - _applied.erase(rt, _applied.end()); - rt = _applied.find(rightt); - _applied.erase(rt, _applied.end()); - } - */ - if (!_applied.count(leftt)) { _applied[leftt] = false; // not ifscoped _routeCmd("add",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); diff --git a/service/OneService.cpp b/service/OneService.cpp index e65ad0e2..92b78a8c 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1609,6 +1609,7 @@ public: bool haveRoute = false; // Ignore routes implied by local managed IPs since adding the IP adds the route + // Commented out to fix ticket #600 (disappearing routes on macOS). Remove this block when we're sure there's no side effects /* for(std::vector::iterator ip(n.managedIps.begin());ip!=n.managedIps.end();++ip) { if ((target->netmaskBits() == ip->netmaskBits())&&(target->containsAddress(*ip))) { -- cgit v1.2.3 From 7e2d6149759e84ab4dc4a4f2e025d143b2882900 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 9 Jan 2018 10:16:49 -0800 Subject: Attempted fix for ticket #656 (failes to acknowledge physical blacklists) --- service/OneService.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index 8aeecd5e..2e9c530d 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -2279,6 +2279,8 @@ public: return 0; } } + } + if (gbl) { for(std::vector::const_iterator a(gbl->begin());a!=gbl->end();++a) { if (a->containsAddress(*reinterpret_cast(remoteAddr))) return 0; -- cgit v1.2.3