mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-20 21:43:08 +00:00
Commented out block which ignores added routes if there already exists an IP in the route's range. Attempted fix for #600
This commit is contained in:
parent
a9c4ce38f0
commit
f7b3ffe8a0
@ -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.
|
// 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
|
// 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.
|
// 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;
|
bool found = false;
|
||||||
std::vector<_RTE> currRoutes(_getRTEs(_target,false));
|
std::vector<_RTE> currRoutes(_getRTEs(_target,false));
|
||||||
for(std::vector<_RTE>::iterator r(currRoutes.begin());r!=currRoutes.end();++r) {
|
for(std::vector<_RTE>::iterator r(currRoutes.begin());r!=currRoutes.end();++r) {
|
||||||
@ -496,6 +500,7 @@ bool ManagedRoute::sync()
|
|||||||
rt = _applied.find(rightt);
|
rt = _applied.find(rightt);
|
||||||
_applied.erase(rt, _applied.end());
|
_applied.erase(rt, _applied.end());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (!_applied.count(leftt)) {
|
if (!_applied.count(leftt)) {
|
||||||
_applied[leftt] = false; // not ifscoped
|
_applied[leftt] = false; // not ifscoped
|
||||||
|
@ -1610,12 +1610,14 @@ public:
|
|||||||
bool haveRoute = false;
|
bool haveRoute = false;
|
||||||
|
|
||||||
// Ignore routes implied by local managed IPs since adding the IP adds the route
|
// 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) {
|
for(std::vector<InetAddress>::iterator ip(n.managedIps.begin());ip!=n.managedIps.end();++ip) {
|
||||||
if ((target->netmaskBits() == ip->netmaskBits())&&(target->containsAddress(*ip))) {
|
if ((target->netmaskBits() == ip->netmaskBits())&&(target->containsAddress(*ip))) {
|
||||||
haveRoute = true;
|
haveRoute = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (haveRoute)
|
if (haveRoute)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user