Răsfoiți Sursa

Merge pull request #2019 from zerotier:ctl-reduce-hello

Grant Limberg 2 ani în urmă
părinte
comite
ce989d0d67
2 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 2 0
      ext/central-controller-docker/main.sh
  2. 2 4
      node/Peer.cpp

+ 2 - 0
ext/central-controller-docker/main.sh

@@ -64,6 +64,7 @@ fi
 popd
 
 DEFAULT_PORT=9993
+DEFAULT_LB_MODE=false
 
 APP_NAME="controller-$(cat /var/lib/zerotier-one/identity.public | cut -d ':' -f 1)"
 
@@ -76,6 +77,7 @@ echo "{
             \"inot\",
             \"nat64\"
         ],
+        \"lowBandwidthMode\": ${ZT_LB_MODE:-$DEFAULT_LB_MODE},
         \"ssoRedirectURL\": \"${ZT_SSO_REDIRECT_URL}\",
         \"allowManagementFrom\": [\"127.0.0.1\", \"::1\", \"10.0.0.0/8\"],
         ${REDIS}

+ 2 - 4
node/Peer.cpp

@@ -210,10 +210,8 @@ void Peer::received(
 		if (sinceLastPush >= ((hops == 0) ? ZT_DIRECT_PATH_PUSH_INTERVAL_HAVEPATH * timerScale : ZT_DIRECT_PATH_PUSH_INTERVAL)) {
 			_lastDirectPathPushSent = now;
 			std::vector<InetAddress> pathsToPush(RR->node->directPaths());
-			if (! lowBandwidth) {
-				std::vector<InetAddress> ma = RR->sa->whoami();
-				pathsToPush.insert(pathsToPush.end(), ma.begin(), ma.end());
-			}
+			std::vector<InetAddress> ma = RR->sa->whoami();
+			pathsToPush.insert(pathsToPush.end(), ma.begin(), ma.end());
 			if (!pathsToPush.empty()) {
 				std::vector<InetAddress>::const_iterator p(pathsToPush.begin());
 				while (p != pathsToPush.end()) {