diff --git a/debian/changelog b/debian/changelog index f80ceabbe..1fecadf8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zerotier-one (1.8.1) unstable; urgency=medium + + * See RELEASE-NOTES.md for release notes. + + -- Adam Ierymenko Wed, 20 Oct 2021 01:00:00 -0700 + zerotier-one (1.8.0) unstable; urgency=medium * See RELEASE-NOTES.md for release notes. diff --git a/debian/rules b/debian/rules index e8c46d189..deaa94da1 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,7 @@ CXXFLAGS=-O3 -fstack-protector-strong dh $@ --with systemd override_dh_auto_build: - make -j + make -j4 override_dh_systemd_start: dh_systemd_start --restart-after-upgrade diff --git a/ext/installfiles/mac/ZeroTier One.pkgproj b/ext/installfiles/mac/ZeroTier One.pkgproj index 939a41884..60b30ca45 100755 --- a/ext/installfiles/mac/ZeroTier One.pkgproj +++ b/ext/installfiles/mac/ZeroTier One.pkgproj @@ -701,7 +701,7 @@ USE_HFS+_COMPRESSION VERSION - 1.8.0 + 1.8.1 TYPE 0 diff --git a/ext/installfiles/mac/postinst.sh b/ext/installfiles/mac/postinst.sh index dd6ce375d..707b46701 100755 --- a/ext/installfiles/mac/postinst.sh +++ b/ext/installfiles/mac/postinst.sh @@ -40,9 +40,9 @@ ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" zerotier-idtool if [ -f /tmp/zt1-gui-restart.tmp ]; then for u in `cat /tmp/zt1-gui-restart.tmp`; do if [ -f '/Applications/ZeroTier One.app/Contents/MacOS/ZeroTier One' ]; then - su $u -c '/Applications/ZeroTier\ One.app/Contents/MacOS/ZeroTier\ One &' >>/dev/null 2>&1 & + su $u -c '/usr/bin/open /Applications/ZeroTier\ One.app &' >>/dev/null 2>&1 & else - su $u -c '/Applications/ZeroTier.app/Contents/MacOS/ZeroTier &' >>/dev/null 2>&1 & + su $u -c '/usr/bin/open /Applications/ZeroTier.app &' >>/dev/null 2>&1 & fi done fi diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index cb815a432..2a0a4b9c1 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -1,5 +1,5 @@ - + @@ -7,7 +7,6 @@ - @@ -27,25 +26,25 @@ - + - + - + - - - + + + @@ -64,13 +63,14 @@ - - + + - + + @@ -81,9 +81,10 @@ - - + + + @@ -140,9 +141,6 @@ - - - @@ -151,7 +149,6 @@ - @@ -240,9 +237,6 @@ - - - @@ -334,13 +328,14 @@ - - + + + @@ -406,8 +401,8 @@ - - + + @@ -439,6 +434,7 @@ + @@ -466,16 +462,17 @@ - - - - + + + + - + + @@ -500,7 +497,7 @@ - + diff --git a/ext/installfiles/windows/ZeroTier One.back.aip b/ext/installfiles/windows/ZeroTier One.back.aip deleted file mode 100644 index ba7873e24..000000000 --- a/ext/installfiles/windows/ZeroTier One.back.aip +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/node/Bond.cpp b/node/Bond.cpp index cf4b4eabd..f294eb431 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -1155,16 +1155,6 @@ void Bond::estimatePathQuality(int64_t now) void Bond::processBalanceTasks(int64_t now) { char pathStr[64] = { 0 }; - int totalAllocation = 0; - for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) { - if (! _paths[i].p) { - continue; - } - if (_paths[i].p && _paths[i].bonded && _paths[i].eligible) { - totalAllocation += _paths[i].allocation; - } - } - unsigned char minimumAllocationValue = (uint8_t)(0.33 * ((float)totalAllocation / (float)_numBondedPaths)); if (_allowFlowHashing) { /** @@ -1209,7 +1199,18 @@ void Bond::processBalanceTasks(int64_t now) * Re-allocate flows from under-performing * NOTE: This could be part of the above block but was kept separate for clarity. */ - if (_policy == ZT_BOND_POLICY_BALANCE_XOR || _policy == ZT_BOND_POLICY_BALANCE_AWARE) { + if (_policy == ZT_BOND_POLICY_BALANCE_AWARE) { + int totalAllocation = 0; + for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) { + if (! _paths[i].p) { + continue; + } + if (_paths[i].p && _paths[i].bonded && _paths[i].eligible) { + totalAllocation += _paths[i].allocation; + } + } + unsigned char minimumAllocationValue = (uint8_t)(0.33 * ((float)totalAllocation / (float)_numBondedPaths)); + Mutex::Lock _l(_flows_m); for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) { if (! _paths[i].p) { @@ -1754,7 +1755,7 @@ void Bond::dumpPathStatus(int64_t now, int pathIdx) { char pathStr[64] = { 0 }; _paths[pathIdx].p->address().toString(pathStr); - log("path status: [%2d] alive:%d, eli:%d, bonded:%d, flows:%6d, lat:%10.3f, jitter:%10.3f, error:%6.4f, loss:%6.4f, age:%6d --- (%s/%s)", + log("path status: [%2d] alive:%d, eli:%d, bonded:%d, flows:%6d, lat:%10.3f, jitter:%10.3f, error:%6.4f, loss:%6.4f, age:%6d alloc:%d--- (%s/%s)", pathIdx, _paths[pathIdx].alive, _paths[pathIdx].eligible, @@ -1765,6 +1766,7 @@ void Bond::dumpPathStatus(int64_t now, int pathIdx) _paths[pathIdx].packetErrorRatio, _paths[pathIdx].packetLossRatio, _paths[pathIdx].p->age(now), + _paths[pathIdx].allocation, getLink(_paths[pathIdx].p)->ifname().c_str(), pathStr); } diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp index f02900325..3744ee8a6 100644 --- a/osdep/Binder.hpp +++ b/osdep/Binder.hpp @@ -40,7 +40,7 @@ #endif #endif -#if defined(__unix__) && !defined(__LINUX__) +#if (defined(__unix__) || defined(__APPLE__)) && !defined(__LINUX__) #include #include #include @@ -311,7 +311,7 @@ class Binder { if (! gotViaProc) { struct ifaddrs* ifatbl = (struct ifaddrs*)0; struct ifaddrs* ifa; -#if defined(__unix__) && !defined(__LINUX__) +#if (defined(__unix__) || defined(__APPLE__)) && !defined(__LINUX__) // set up an IPv6 socket so we can check the state of interfaces via SIOCGIFAFLAG_IN6 int infoSock = socket(AF_INET6, SOCK_DGRAM, 0); #endif @@ -320,7 +320,7 @@ class Binder { while (ifa) { if ((ifa->ifa_name) && (ifa->ifa_addr)) { InetAddress ip = *(ifa->ifa_addr); -#if defined(__unix__) && !defined(__LINUX__) +#if (defined(__unix__) || defined(__APPLE__)) && !defined(__LINUX__) // Check if the address is an IPv6 Temporary Address, macOS/BSD version if (ifa->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6* sa6 = (struct sockaddr_in6*)ifa->ifa_addr; diff --git a/osdep/MacEthernetTapAgent.c b/osdep/MacEthernetTapAgent.c index 43c4cf133..ca75ed054 100644 --- a/osdep/MacEthernetTapAgent.c +++ b/osdep/MacEthernetTapAgent.c @@ -157,7 +157,7 @@ static int run(const char *path,...) args[argNo++] = (char *)0; va_end(ap); - pid_t pid = vfork(); + pid_t pid = fork(); if (pid < 0) { return -1; } else if (pid == 0) { diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 4c1214a66..4371edbea 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -507,15 +507,15 @@ bool ManagedRoute::sync() } } - if (!_applied.count(leftt)) { + //if (!_applied.count(leftt)) { _applied[leftt] = !_via; - _routeCmd("delete",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); + //_routeCmd("delete",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); _routeCmd("add",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); //_routeCmd("change",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device); - } - if ((rightt)&&(!_applied.count(rightt))) { + //} + if (rightt) { _applied[rightt] = !_via; - _routeCmd("delete",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); + //_routeCmd("delete",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); _routeCmd("add",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); //_routeCmd("change",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device); } diff --git a/service/OneService.cpp b/service/OneService.cpp index dbbac3560..255bad21e 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1823,10 +1823,7 @@ public: speed, alloc, linkNameStr.c_str()); enabled = false; } - //uint32_t upDelay = OSUtils::jsonInt(link["upDelay"],-1); - //uint32_t downDelay = OSUtils::jsonInt(link["downDelay"],-1); uint8_t ipvPref = OSUtils::jsonInt(link["ipvPref"],0); - //uint32_t linkMonitorInterval = OSUtils::jsonInt(link["monitorInterval"],(uint64_t)0); std::string failoverToStr(OSUtils::jsonString(link["failoverTo"],"")); // Mode std::string linkModeStr(OSUtils::jsonString(link["mode"],"spare")); diff --git a/version.h b/version.h index e93842665..3e5172416 100644 --- a/version.h +++ b/version.h @@ -27,7 +27,7 @@ /** * Revision */ -#define ZEROTIER_ONE_VERSION_REVISION 0 +#define ZEROTIER_ONE_VERSION_REVISION 1 /** * Build version diff --git a/zerotier-one.spec b/zerotier-one.spec index 810b946ac..116b904d6 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -1,5 +1,5 @@ Name: zerotier-one -Version: 1.7.1 +Version: 1.8.1 Release: 1%{?dist} Summary: ZeroTier network virtualization service @@ -152,6 +152,9 @@ esac %endif %changelog +* Wed Oct 20 2021 Adam Ierymenko - 1.8.1 +- see https://github.com/zerotier/ZeroTierOne for release notes + * Tue Sep 15 2021 Adam Ierymenko - 1.8.0 - see https://github.com/zerotier/ZeroTierOne for release notes