2
0
Adam Ierymenko 7 жил өмнө
parent
commit
07cb62a503

+ 0 - 20
node/NetworkConfig.hpp

@@ -102,11 +102,6 @@
  */
  */
 #define ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR 0x0000040000000000ULL
 #define ZT_NETWORKCONFIG_SPECIALIST_TYPE_ANCHOR 0x0000040000000000ULL
 
 
-/**
- * Device can send CIRCUIT_TESTs for this network
- */
-#define ZT_NETWORKCONFIG_SPECIALIST_TYPE_CIRCUIT_TESTER 0x0000080000000000ULL
-
 namespace ZeroTier {
 namespace ZeroTier {
 
 
 // Dictionary capacity needed for max size network config
 // Dictionary capacity needed for max size network config
@@ -344,21 +339,6 @@ public:
 		return false;
 		return false;
 	}
 	}
 
 
-	/**
-	 * @param byPeer Address to check
-	 * @return True if this peer is allowed to do circuit tests on this network (controller is always true)
-	 */
-	inline bool circuitTestingAllowed(const Address &byPeer) const
-	{
-		if (byPeer.toInt() == ((networkId >> 24) & 0xffffffffffULL))
-			return true;
-		for(unsigned int i=0;i<specialistCount;++i) {
-			if ((byPeer == specialists[i])&&((specialists[i] & ZT_NETWORKCONFIG_SPECIALIST_TYPE_CIRCUIT_TESTER) != 0))
-				return true;
-		}
-		return false;
-	}
-
 	/**
 	/**
 	 * @return True if this network config is non-NULL
 	 * @return True if this network config is non-NULL
 	 */
 	 */

+ 7 - 2
node/Utils.hpp

@@ -40,8 +40,9 @@
 
 
 #include "Constants.hpp"
 #include "Constants.hpp"
 
 
-// So it's 2017 and this still helps on most Linux versions. It shouldn't but it does. Go figure.
-#if defined(__LINUX__) && ((defined(_MSC_VER) || defined(__GNUC__)) && (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(__x86_64__) || defined(__AMD64) || defined(__AMD64__) || defined(_M_X64)))
+#ifdef __LINUX__
+
+#if (defined(_MSC_VER) || defined(__GNUC__)) && (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(__x86_64__) || defined(__AMD64) || defined(__AMD64__) || defined(_M_X64))
 #include <emmintrin.h>
 #include <emmintrin.h>
 static inline void ZT_FAST_MEMCPY(void *a,const void *b,unsigned long k)
 static inline void ZT_FAST_MEMCPY(void *a,const void *b,unsigned long k)
 {
 {
@@ -74,6 +75,10 @@ static inline void ZT_FAST_MEMCPY(void *a,const void *b,unsigned long k)
 #define ZT_FAST_MEMCPY(a,b,c) memcpy(a,b,c)
 #define ZT_FAST_MEMCPY(a,b,c) memcpy(a,b,c)
 #endif
 #endif
 
 
+#else
+#define ZT_FAST_MEMCPY(a,b,c) memcpy(a,b,c)
+#endif
+
 namespace ZeroTier {
 namespace ZeroTier {
 
 
 /**
 /**