From c6ae81fac751e02bfd898eb560a0efb38d037485 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Sun, 11 Nov 2018 14:23:24 -0800 Subject: [PATCH 1/4] 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 95efb6413..be9d9ca3f 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 c3769d057..8c65cfb69 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 From b3c2c0866f0892d415738e98a216829c47f1f855 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sun, 11 Nov 2018 17:38:17 -0800 Subject: [PATCH 2/4] Times should be int64_t, not uint64_t --- node/Membership.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/Membership.hpp b/node/Membership.hpp index ad0bb73e9..76e71ef5b 100644 --- a/node/Membership.hpp +++ b/node/Membership.hpp @@ -244,9 +244,9 @@ private: // Time we last pushed our local credentials to this member struct { - uint64_t tag[ZT_MAX_NETWORK_TAGS]; - uint64_t cap[ZT_MAX_NETWORK_CAPABILITIES]; - uint64_t coo[ZT_MAX_CERTIFICATES_OF_OWNERSHIP]; + int64_t tag[ZT_MAX_NETWORK_TAGS]; + int64_t cap[ZT_MAX_NETWORK_CAPABILITIES]; + int64_t coo[ZT_MAX_CERTIFICATES_OF_OWNERSHIP]; } _localCredLastPushed; public: From 15649334a6dfffb95bc0df3743d78ab10b61b538 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sun, 11 Nov 2018 19:22:07 -0800 Subject: [PATCH 3/4] Do not use new "feth" devices for ZT traffic. --- service/OneService.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index 8c65cfb69..b14192346 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -2745,6 +2745,7 @@ public: #endif #ifdef __APPLE__ + if ((ifname[0] == 'f')&&(ifname[1] == 'e')&&(ifname[2] == 't')&&(ifname[3] == 'h')) return false; // ... as is feth# if ((ifname[0] == 'l')&&(ifname[1] == 'o')) return false; // loopback if ((ifname[0] == 'z')&&(ifname[1] == 't')) return false; // sanity check: zt# if ((ifname[0] == 't')&&(ifname[1] == 'u')&&(ifname[2] == 'n')) return false; // tun# is probably an OpenVPN tunnel or similar From 296e4616ccb6a78b5b52fc23e54b4a09d6805883 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sun, 11 Nov 2018 20:31:31 -0800 Subject: [PATCH 4/4] Migrate Windows to use Visual Studio 2017 Community instead of 2015. --- windows/ZeroTierOne.sln | 13 +++-- windows/ZeroTierOne/ZeroTierOne.vcxproj | 49 ++++++++++++++----- .../ZeroTierOne/ZeroTierOne.vcxproj.filters | 3 ++ 3 files changed, 48 insertions(+), 17 deletions(-) diff --git a/windows/ZeroTierOne.sln b/windows/ZeroTierOne.sln index 05f498fb8..1ccdf88b0 100644 --- a/windows/ZeroTierOne.sln +++ b/windows/ZeroTierOne.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2050 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroTierOne", "ZeroTierOne\ZeroTierOne.vcxproj", "{B00A4957-5977-4AC1-9EF4-571DC27EADA2}" EndProject @@ -106,9 +106,9 @@ Global {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Mixed Platforms.Build.0 = Release|Win32 {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Mixed Platforms.Deploy.0 = Release|Win32 - {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.ActiveCfg = Release|Win32 - {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Build.0 = Release|Win32 - {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Deploy.0 = Release|Win32 + {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.ActiveCfg = Release|x64 + {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Build.0 = Release|x64 + {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Deploy.0 = Release|x64 {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|x64.ActiveCfg = Release|x64 {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.SingleImage|Any CPU.ActiveCfg = Release|Win32 {B00A4957-5977-4AC1-9EF4-571DC27EADA2}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 @@ -460,4 +460,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AD00A172-C020-4874-B00A-C396AAC893FC} + EndGlobalSection EndGlobal diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 29f088749..8e08d3fb4 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -153,6 +153,7 @@ + @@ -197,45 +198,48 @@ {B00A4957-5977-4AC1-9EF4-571DC27EADA2} ZeroTierOne + 10.0.17134.0 Application true - v140 + v141 MultiByte Application true - v140 + v141 MultiByte Application true - v140 + v141 MultiByte Application true - v140 + v141 MultiByte Application false - v140 + v141 true MultiByte + Static Application false - v140 + v141 true MultiByte + Static @@ -298,6 +302,9 @@ ZT_EXPORT;FD_SETSIZE=1024;NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions) 4996 + false + stdcpp14 + true true @@ -314,6 +321,8 @@ ZT_EXPORT;FD_SETSIZE=1024;NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions) 4996 + false + stdcpp14 true @@ -329,8 +338,10 @@ ZT_EXPORT;FD_SETSIZE=1024;NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_RULES_ENGINE_DEBUGGING;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions) - false + true 4996 + false + stdcpp14 true @@ -349,6 +360,8 @@ ZT_EXPORT;FD_SETSIZE=1024;NOMINMAX;STATICLIB;WIN32;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions) false 4996 + false + stdcpp14 true @@ -359,7 +372,7 @@ - Level3 + Level2 MaxSpeed true true @@ -375,9 +388,15 @@ true 4996 Guard + false + stdcpp14 + None + false + false + true - true + false true true wsock32.lib;ws2_32.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) @@ -386,7 +405,7 @@ - Level3 + Level2 MaxSpeed true true @@ -404,9 +423,15 @@ Guard false VectorCall + false + stdcpp14 + None + false + false + true - true + false true true wsock32.lib;ws2_32.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters index d07c0638e..22f8aa3eb 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters @@ -497,6 +497,9 @@ Header Files\controller + + Header Files\node +