diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index 3fb39aa3a..1ab48f41b 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -1031,25 +1031,21 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST( if (b.count("dns")) { json &dns = b["dns"]; - if (dns.is_array()) { - json nda = json::array(); - for(unsigned int i=0;i +#endif + #define Te1_r(x) ZT_ROR32(Te0[x], 8U) #define Te2_r(x) ZT_ROR32(Te0[x], 16U) #define Te3_r(x) ZT_ROR32(Te0[x], 24U) diff --git a/node/Constants.hpp b/node/Constants.hpp index 53b44dd42..e4d197f41 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -111,13 +111,21 @@ #include #endif + + #if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON)) +#if (defined(__APPLE__) && !defined(__LP64__)) || (defined(__ANDROID__) && defined(__arm__)) +#ifdef ZT_ARCH_ARM_HAS_NEON +#undef ZT_ARCH_ARM_HAS_NEON +#endif +#else #ifndef ZT_ARCH_ARM_HAS_NEON #define ZT_ARCH_ARM_HAS_NEON 1 #endif #include /*#include */ #endif +#endif // Define ZT_NO_TYPE_PUNNING to disable reckless casts on anything other than x86/x64. #if (!(defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(_M_IX86) || defined(__X86__) || defined(_X86_) || defined(__I86__) || defined(__INTEL__) || defined(__386))) diff --git a/node/Utils.cpp b/node/Utils.cpp index 508e553e3..1acd5e1bf 100644 --- a/node/Utils.cpp +++ b/node/Utils.cpp @@ -42,6 +42,14 @@ #include "Mutex.hpp" #include "Salsa20.hpp" +#ifdef __APPLE__ +#include +#endif + +#if defined(__ANDROID__) && defined(__aarch64__) +#include +#endif + namespace ZeroTier { const uint64_t Utils::ZERO256[4] = {0ULL,0ULL,0ULL,0ULL}; @@ -51,6 +59,13 @@ const char Utils::HEXCHARS[16] = { '0','1','2','3','4','5','6','7','8','9','a',' #ifdef ZT_ARCH_ARM_HAS_NEON Utils::ARMCapabilities::ARMCapabilities() noexcept { +#if TARGET_OS_IPHONE + this->aes = true; + this->crc32 = true; + this->pmull = true; + this->sha1 = true; + this->sha2 = true; +#else #ifdef HWCAP2_AES if (sizeof(void *) == 4) { const long hwcaps2 = getauxval(AT_HWCAP2); @@ -70,6 +85,7 @@ Utils::ARMCapabilities::ARMCapabilities() noexcept #ifdef HWCAP2_AES } #endif +#endif // TARGET_OS_IPHONE } const Utils::ARMCapabilities Utils::ARMCAP; diff --git a/windows/TapDriver6/adapter.c b/windows/TapDriver6/adapter.c index 7ce4b310c..c170e2215 100644 --- a/windows/TapDriver6/adapter.c +++ b/windows/TapDriver6/adapter.c @@ -272,7 +272,8 @@ tapReadConfiguration( if (status == NDIS_STATUS_SUCCESS) { - if (configParameter->ParameterType == NdisParameterString) + if (configParameter->ParameterType == NdisParameterString + && configParameter->ParameterData.StringData.Length <= sizeof(Adapter->NetCfgInstanceIdBuffer) - sizeof(WCHAR)) { DEBUGP (("[TAP] NdisReadConfiguration (NetCfgInstanceId=%wZ)\n", &configParameter->ParameterData.StringData ));