From c6ae81fac751e02bfd898eb560a0efb38d037485 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Sun, 11 Nov 2018 14:23:24 -0800 Subject: Added preprocessor check for __APPLE__ as an attempted fix for ticket #600 --- osdep/Binder.hpp | 2 +- service/OneService.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp index 95efb641..be9d9ca3 100644 --- a/osdep/Binder.hpp +++ b/osdep/Binder.hpp @@ -373,7 +373,7 @@ public: tcps = phy.tcpListen(reinterpret_cast(&(ii->first)),(void *)0); if ((udps)&&(tcps)) { #ifdef __LINUX__ - // Bind Linux sockets to their device so routes tha we manage do not override physical routes (wish all platforms had this!) + // Bind Linux sockets to their device so routes that we manage do not override physical routes (wish all platforms had this!) if (ii->second.length() > 0) { char tmp[256]; Utils::scopy(tmp,sizeof(tmp),ii->second.c_str()); diff --git a/service/OneService.cpp b/service/OneService.cpp index c3769d05..8c65cfb6 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1801,12 +1801,14 @@ public: bool haveRoute = false; // Ignore routes implied by local managed IPs since adding the IP adds the route +#ifndef __APPLE__ for(std::vector::iterator ip(n.managedIps.begin());ip!=n.managedIps.end();++ip) { if ((target->netmaskBits() == ip->netmaskBits())&&(target->containsAddress(*ip))) { haveRoute = true; break; } } +#endif if (haveRoute) continue; #ifndef ZT_SDK -- cgit v1.2.3