diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-07-20 15:53:19 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-07-20 15:53:19 -0700 |
commit | fa7e7fc6f976e3ad27fd1212d3ba17148764bc21 (patch) | |
tree | b5f5721c2ed97b104ba1fa951499e4cafac61e4d | |
parent | 5b114791e52c046be3b5db254566928ccc6c7a23 (diff) | |
download | infinitytier-fa7e7fc6f976e3ad27fd1212d3ba17148764bc21.tar.gz infinitytier-fa7e7fc6f976e3ad27fd1212d3ba17148764bc21.zip |
Revert fix for GitHub issue #600 because it causes route objects to build up forever (at least on Mac). Bleh. #600 is a rare issue and will need some other fix after reliable duplication.
-rw-r--r-- | osdep/ManagedRoute.cpp | 1 | ||||
-rw-r--r-- | service/OneService.cpp | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index d7c80704..324fada0 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -246,6 +246,7 @@ static std::vector<_RTE> _getRTEs(const InetAddress &target,bool contains) static void _routeCmd(const char *op,const InetAddress &target,const InetAddress &via,const char *ifscope,const char *localInterface) { + //char f1[1024],f2[1024]; printf("%s %s %s %s %s\n",op,target.toString(f1),via.toString(f2),ifscope,localInterface); long p = (long)fork(); if (p > 0) { int exitcode = -1; diff --git a/service/OneService.cpp b/service/OneService.cpp index ea336f07..389cdc91 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1610,12 +1610,10 @@ public: // Nuke applied routes that are no longer in n.config.routes[] and/or are not allowed for(std::list< SharedPtr<ManagedRoute> >::iterator mr(n.managedRoutes.begin());mr!=n.managedRoutes.end();) { bool haveRoute = false; - if ( (checkIfManagedIsAllowed(n,(*mr)->target())) && (((*mr)->via().ss_family != (*mr)->target().ss_family)||(!matchIpOnly(myIps,(*mr)->via()))) ) { for(unsigned int i=0;i<n.config.routeCount;++i) { const InetAddress *const target = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].target)); const InetAddress *const via = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].via)); - if ( ((*mr)->target() == *target) && ( ((via->ss_family == target->ss_family)&&((*mr)->via().ipsEqual(*via))) || (strcmp(tapdev,(*mr)->device())==0) ) ) { haveRoute = true; break; @@ -1640,15 +1638,12 @@ 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<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; |