summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2018-01-05 17:10:59 -0800
committerJoseph Henry <josephjah@gmail.com>2018-01-05 17:10:59 -0800
commitf7b3ffe8a0ddab78a547560d164223747c93c4db (patch)
tree4e9bc8fe914df29f6d6a5623a4d118574dd90d1a
parenta9c4ce38f0b3aaae7e354e56dd6548f8e1ae928d (diff)
downloadinfinitytier-f7b3ffe8a0ddab78a547560d164223747c93c4db.tar.gz
infinitytier-f7b3ffe8a0ddab78a547560d164223747c93c4db.zip
Commented out block which ignores added routes if there already exists an IP in the route's range. Attempted fix for #600
-rw-r--r--osdep/ManagedRoute.cpp5
-rw-r--r--service/OneService.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp
index a3746572..2289b23a 100644
--- a/osdep/ManagedRoute.cpp
+++ b/osdep/ManagedRoute.cpp
@@ -480,6 +480,10 @@ 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) {
@@ -496,6 +500,7 @@ bool ManagedRoute::sync()
rt = _applied.find(rightt);
_applied.erase(rt, _applied.end());
}
+ */
if (!_applied.count(leftt)) {
_applied[leftt] = false; // not ifscoped
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 3ca75362..a21c1c08 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -1610,12 +1610,14 @@ public:
bool haveRoute = false;
// Ignore routes implied by local managed IPs since adding the IP adds the route
+ /*
for(std::vector<InetAddress>::iterator ip(n.managedIps.begin());ip!=n.managedIps.end();++ip) {
if ((target->netmaskBits() == ip->netmaskBits())&&(target->containsAddress(*ip))) {
haveRoute = true;
break;
}
}
+ */
if (haveRoute)
continue;