summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controller/EmbeddedNetworkController.cpp2
-rw-r--r--ext/installfiles/windows/ZeroTier One.aip8
-rw-r--r--make-linux.mk12
-rw-r--r--node/Constants.hpp8
-rw-r--r--node/Switch.cpp3
-rw-r--r--one.cpp2
-rw-r--r--service/OneService.cpp4
7 files changed, 27 insertions, 12 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index 9a07b285..ef52f6e0 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -551,7 +551,7 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpGET(
for(auto member=members.begin();member!=members.end();++member) {
mid = (*member)["id"];
char tmp[128];
- OSUtils::ztsnprintf(tmp,sizeof(tmp),"%s\"%s\":%llu",(responseBody.length() > 1) ? ",\"" : "\"",mid.c_str(),(unsigned long long)OSUtils::jsonInt((*member)["revision"],0));
+ OSUtils::ztsnprintf(tmp,sizeof(tmp),"%s\"%s\":%llu",(responseBody.length() > 1) ? "," : "",mid.c_str(),(unsigned long long)OSUtils::jsonInt((*member)["revision"],0));
responseBody.append(tmp);
}
}
diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip
index d160a167..cfa7d673 100644
--- a/ext/installfiles/windows/ZeroTier One.aip
+++ b/ext/installfiles/windows/ZeroTier One.aip
@@ -27,10 +27,10 @@
<ROW Property="CTRLS" Value="2"/>
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
- <ROW Property="ProductCode" Value="1033:{D70A2F09-236E-4BB0-8BD9-9E08EA43824B} " Type="16"/>
+ <ROW Property="ProductCode" Value="1033:{A400C1B3-BF08-4CCE-A13A-60B98FA41CD2} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="ZeroTier One"/>
- <ROW Property="ProductVersion" Value="1.2.8" Type="32"/>
+ <ROW Property="ProductVersion" Value="1.2.10" Type="32"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
@@ -64,7 +64,7 @@
<ROW Directory="x86_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x86"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
- <ROW Component="AI_CustomARPName" ComponentId="{3579DC29-4B25-4F56-A1D5-AFDE6883AA9C}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
+ <ROW Component="AI_CustomARPName" ComponentId="{58E98F1B-5626-4810-A5A2-AD71DCF3FC09}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
<ROW Component="AI_DisableModify" ComponentId="{020DCABD-5D56-49B9-AF48-F07F0B55E590}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
<ROW Component="AI_ExePath" ComponentId="{8E02B36C-7A19-429B-A93E-77A9261AC918}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
<ROW Component="Hardcodet.Wpf.TaskbarNotification.dll" ComponentId="{BEA825AF-2555-44AF-BE40-47FFC16DCBA6}" Directory_="APPDIR" Attributes="0" KeyPath="Hardcodet.Wpf.TaskbarNotification.dll"/>
@@ -454,7 +454,7 @@
<ROW XmlAttribute="xsischemaLocation" XmlElement="swidsoftware_identification_tag" Name="xsi:schemaLocation" Flags="14" Order="3" Value="http://standards.iso.org/iso/19770/-2/2008/schema.xsd software_identification_tag.xsd"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
- <ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="8"/>
+ <ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="10"/>
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false"/>
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1"/>
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="2"/>
diff --git a/make-linux.mk b/make-linux.mk
index 62f319bf..56096da8 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -79,7 +79,7 @@ endif
ifeq ($(ZT_SYNOLOGY), 1)
override CFLAGS+=-fPIC
override CXXFLAGS+=-fPIC
- override DEFS+=-D__SYNOLOGY__
+ override DEFS+=-D__SYNOLOGY__
endif
ifeq ($(ZT_TRACE),1)
@@ -111,6 +111,12 @@ ifeq ($(CC_MACH),amd64)
endif
ifeq ($(CC_MACH),powerpc64le)
ZT_ARCHITECTURE=8
+ override DEFS+=-DZT_NO_TYPE_PUNNING
+endif
+ifeq ($(CC_MACH),powerpc)
+ ZT_ARCHITECTURE=8
+ override DEFS+=-DZT_NO_TYPE_PUNNING
+ override DEFS+=-DZT_NO_CAPABILITIES
endif
ifeq ($(CC_MACH),ppc64le)
ZT_ARCHITECTURE=8
@@ -199,10 +205,6 @@ ifeq ($(CC_MACH),mips64el)
ZT_ARCHITECTURE=6
override DEFS+=-DZT_NO_TYPE_PUNNING
endif
-ifeq ($(CC_MACH),powerpc64le)
- ZT_ARCHITECTURE=7
- override DEFS+=-DZT_NO_TYPE_PUNNING
-endif
# Fail if system architecture could not be determined
ifeq ($(ZT_ARCHITECTURE),999)
diff --git a/node/Constants.hpp b/node/Constants.hpp
index e2a35dce..03b04e68 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -194,6 +194,14 @@
#define ZT_RX_QUEUE_SIZE 64
/**
+ * Size of TX queue
+ *
+ * This is about 2mb, and can be decreased for small devices. A queue smaller
+ * than about 4 is probably going to cause a lot of lost packets.
+ */
+#define ZT_TX_QUEUE_SIZE 64
+
+/**
* Length of secret key in bytes -- 256-bit -- do not change
*/
#define ZT_PEER_SECRET_KEY_LENGTH 32
diff --git a/node/Switch.cpp b/node/Switch.cpp
index eb1ebadb..3fa8c31d 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -503,6 +503,9 @@ void Switch::send(void *tPtr,Packet &packet,bool encrypt)
if (!_trySend(tPtr,packet,encrypt)) {
{
Mutex::Lock _l(_txQueue_m);
+ if (_txQueue.size() >= ZT_TX_QUEUE_SIZE) {
+ _txQueue.pop_front();
+ }
_txQueue.push_back(TXQueueEntry(dest,RR->node->now(),packet,encrypt));
}
if (!RR->topology->getPeer(tPtr,dest))
diff --git a/one.cpp b/one.cpp
index 9ebc83c1..b770451c 100644
--- a/one.cpp
+++ b/one.cpp
@@ -972,7 +972,7 @@ static void _sighandlerQuit(int sig)
#endif
// Drop privileges on Linux, if supported by libc etc. and "zerotier-one" user exists on system
-#ifdef __LINUX__
+#if defined(__LINUX__) && !defined(ZT_NO_CAPABILITIES)
#ifndef PR_CAP_AMBIENT
#define PR_CAP_AMBIENT 47
#define PR_CAP_AMBIENT_IS_SET 1
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 04d8c8df..91cf49ee 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -1608,11 +1608,13 @@ public:
// Nuke applied routes that are no longer in n.config.routes[] and/or are not allowed
for(std::list< SharedPtr<ManagedRoute> >::iterator mr(n.managedRoutes.begin());mr!=n.managedRoutes.end();) {
bool haveRoute = false;
+
if ( (checkIfManagedIsAllowed(n,(*mr)->target())) && (((*mr)->via().ss_family != (*mr)->target().ss_family)||(!matchIpOnly(myIps,(*mr)->via()))) ) {
for(unsigned int i=0;i<n.config.routeCount;++i) {
const InetAddress *const target = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].target));
const InetAddress *const via = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].via));
- if ( ((*mr)->target() == *target) && ( ((via->ss_family == target->ss_family)&&((*mr)->via().ipsEqual(*via))) || (tapdev == (*mr)->device()) ) ) {
+
+ if ( ((*mr)->target() == *target) && ( ((via->ss_family == target->ss_family)&&((*mr)->via().ipsEqual(*via))) || (strcmp(tapdev,(*mr)->device())==0) ) ) {
haveRoute = true;
break;
}