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

This commit is contained in:
Grant Limberg 2023-06-01 11:21:21 -07:00 committed by GitHub
commit ce989d0d67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

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

View file

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