Skip to content

Commit 68a9634

Browse files
committed
Merge branch 'dev' into gl/ctl-pusub
2 parents 2ba50f4 + 6764857 commit 68a9634

14 files changed

Lines changed: 72 additions & 591 deletions

File tree

RELEASE-NOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
ZeroTier Release Notes
22
======
33

4+
## 2025-12-22 -- Version 1.16.1
5+
6+
* Metrics collection is now disabled by default. It can be enabled via the `enableMetrics` setting in `local.conf`.
7+
* Fix for an issue where metrics were not being recorded while running in daemon mode.
8+
* Fix debug dumpfile being written to the root directory.
9+
* Minor bug fixes in Mac and BSD tun/tap code.
10+
411
## 2025-08-21 -- Version 1.16.0
512

613
* License Changes

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
zerotier-one (1.16.1) unstable; urgency=medium
2+
3+
* See RELEASE-NOTES.md for release notes.
4+
5+
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Mon, 12 Dec 2025 01:00:00 -0700
6+
17
zerotier-one (1.16.0-2) unstable; urgency=medium
28

39
* Fix build settings to include controller.

ext/installfiles/mac/ZeroTier One.pkgproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@
702702
<key>USE_HFS+_COMPRESSION</key>
703703
<false />
704704
<key>VERSION</key>
705-
<string>1.16.0</string>
705+
<string>1.16.1</string>
706706
</dict>
707707
<key>TYPE</key>
708708
<integer>0</integer>

ext/installfiles/windows/ZeroTier One.aip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<ROW Property="AiFeatIcoZeroTierOne" Value="ZeroTierIcon.exe" Type="8"/>
2222
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
2323
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
24-
<ROW Property="ProductCode" Value="1033:{C805CD5B-45F5-49F7-B428-142396DE03CA} " Type="16"/>
24+
<ROW Property="ProductCode" Value="1033:{83B4ADDB-1653-4B88-AE50-614649687DA9} " Type="16"/>
2525
<ROW Property="ProductLanguage" Value="1033"/>
2626
<ROW Property="ProductName" Value="ZeroTier One"/>
27-
<ROW Property="ProductVersion" Value="1.16.0" Options="32"/>
27+
<ROW Property="ProductVersion" Value="1.16.1" Options="32"/>
2828
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
2929
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
3030
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
@@ -62,7 +62,7 @@
6262
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier" DirectoryOptions="12"/>
6363
</COMPONENT>
6464
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
65-
<ROW Component="AI_CustomARPName" ComponentId="{A3752E9B-9B23-4433-B186-24C3C5C4BC4A}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
65+
<ROW Component="AI_CustomARPName" ComponentId="{8633F45B-5725-4FB8-B1B6-D945785D4629}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
6666
<ROW Component="AI_DisableModify" ComponentId="{46FFA8C5-A0CB-4E05-9AD3-911D543DE8CA}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
6767
<ROW Component="AI_ExePath" ComponentId="{8E02B36C-7A19-429B-A93E-77A9261AC918}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
6868
<ROW Component="APPDIR" ComponentId="{4DD7907D-D7FE-4CD6-B1A0-B5C1625F5133}" Directory_="APPDIR" Attributes="0"/>
@@ -515,7 +515,7 @@
515515
<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"/>
516516
</COMPONENT>
517517
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
518-
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="0" UpdateIndexInParent="0"/>
518+
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="1" UpdateIndexInParent="0"/>
519519
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false" UpdateIndexInParent="0"/>
520520
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1" UpdateIndexInParent="0"/>
521521
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="16" UpdateIndexInParent="0"/>

ext/installfiles/windows/ZeroTier One.back.aip

Lines changed: 0 additions & 558 deletions
This file was deleted.

ext/prometheus-cpp-lite-1.0/core/include/prometheus/save_to_file.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ namespace prometheus {
5050
public:
5151
SaveToFile() = default;
5252

53+
void stop() {
54+
must_die = true;
55+
worker_thread.join();
56+
}
57+
58+
void restart() {
59+
must_die = false;
60+
worker_thread = std::thread(&SaveToFile::worker_function, this);
61+
}
62+
5363
~SaveToFile() {
5464
must_die = true;
5565
worker_thread.join();

one.cpp

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,12 +1196,13 @@ static int cli(int argc, char** argv)
11961196
return 0;
11971197
}
11981198

1199-
snprintf((char*)path, sizeof(path), "%s%szerotier_dump.txt", (char*)path, ZT_PATH_SEPARATOR_S);
1199+
char dumpfile[PATH_MAX];
1200+
snprintf(dumpfile, sizeof(dumpfile), "%s%szerotier_dump.txt", (char*)path, ZT_PATH_SEPARATOR_S);
12001201

1201-
fprintf(stdout, "Writing dump to: %s\n", path);
1202-
int fd = open((char*)path, O_CREAT | O_RDWR, 0664);
1202+
fprintf(stdout, "Writing dump to: %s\n", dumpfile);
1203+
int fd = open(dumpfile, O_CREAT | O_WRONLY | O_TRUNC, 0664);
12031204
if (fd == -1) {
1204-
fprintf(stderr, "Error creating file.\n");
1205+
perror("Error creating file");
12051206
return 1;
12061207
}
12071208
write(fd, dump.str().c_str(), dump.str().size());
@@ -1278,9 +1279,9 @@ static int cli(int argc, char** argv)
12781279
return 0;
12791280
}
12801281

1281-
BOOL err = WriteFile(file, dump.str().c_str(), dump.str().size(), NULL, NULL);
1282-
if (err = FALSE) {
1283-
fprintf(stderr, "Error writing file");
1282+
BOOL ok = WriteFile(file, dump.str().c_str(), dump.str().size(), NULL, NULL);
1283+
if (ok == FALSE) {
1284+
fprintf(stderr, "Error writing file\n");
12841285
return 1;
12851286
}
12861287
CloseHandle(file);
@@ -1346,12 +1347,15 @@ static int cli(int argc, char** argv)
13461347
}
13471348
close(sock);
13481349
char cwd[16384];
1349-
getcwd(cwd, sizeof(cwd));
1350-
snprintf(cwd, sizeof(cwd), "%s%szerotier_dump.txt", cwd, ZT_PATH_SEPARATOR_S);
1351-
fprintf(stdout, "Writing dump to: %s\n", cwd);
1352-
int fd = open(cwd, O_CREAT | O_RDWR, 0664);
1350+
if (getcwd(cwd, sizeof(cwd)) == nullptr) {
1351+
strcpy(cwd, ".");
1352+
}
1353+
char dumpfile[sizeof(cwd) + 32];
1354+
snprintf(dumpfile, sizeof(dumpfile), "%s%szerotier_dump.txt", cwd, ZT_PATH_SEPARATOR_S);
1355+
fprintf(stdout, "Writing dump to: %s\n", dumpfile);
1356+
int fd = open(dumpfile, O_CREAT | O_WRONLY | O_TRUNC, 0664);
13531357
if (fd == -1) {
1354-
fprintf(stderr, "Error creating file.\n");
1358+
perror("Error creating file");
13551359
return 1;
13561360
}
13571361
write(fd, dump.str().c_str(), dump.str().size());
@@ -2330,14 +2334,18 @@ int main(int argc, char** argv)
23302334
}
23312335
#endif // !ZT_ONE_NO_ROOT_CHECK
23322336
if (runAsDaemon) {
2337+
prometheus::simpleapi::saver.stop();
2338+
23332339
long p = (long)fork();
23342340
if (p < 0) {
23352341
fprintf(stderr, "%s: could not fork" ZT_EOL_S, argv[0]);
23362342
return 1;
23372343
}
23382344
else if (p > 0)
2339-
return 0; // forked
2345+
_Exit(0); // forked
23402346
// else p == 0, so we are daemonized
2347+
2348+
prometheus::simpleapi::saver.restart();
23412349
}
23422350
#endif // __UNIX_LIKE__
23432351

osdep/BSDEthernetTap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ std::vector<InetAddress> BSDEthernetTap::ips() const
339339
freeifaddrs(ifa);
340340

341341
std::sort(r.begin(), r.end());
342-
std::unique(r.begin(), r.end());
342+
r.erase(std::unique(r.begin(), r.end()), r.end());
343343

344344
_ifaddrs = r;
345345

@@ -394,7 +394,7 @@ void BSDEthernetTap::scanMulticastGroups(std::vector<MulticastGroup>& added, std
394394
newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip));
395395

396396
std::sort(newGroups.begin(), newGroups.end());
397-
std::unique(newGroups.begin(), newGroups.end());
397+
newGroups.erase(std::unique(newGroups.begin(), newGroups.end()), newGroups.end());
398398

399399
for (std::vector<MulticastGroup>::iterator m(newGroups.begin()); m != newGroups.end(); ++m) {
400400
if (! std::binary_search(_multicastGroups.begin(), _multicastGroups.end(), *m))

osdep/MacKextEthernetTap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void MacKextEthernetTap::scanMulticastGroups(std::vector<MulticastGroup>& added,
607607
newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip));
608608

609609
std::sort(newGroups.begin(), newGroups.end());
610-
std::unique(newGroups.begin(), newGroups.end());
610+
newGroups.erase(std::unique(newGroups.begin(), newGroups.end()), newGroups.end());
611611

612612
for (std::vector<MulticastGroup>::iterator m(newGroups.begin()); m != newGroups.end(); ++m) {
613613
if (! std::binary_search(_multicastGroups.begin(), _multicastGroups.end(), *m))

osdep/NetBSDEthernetTap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ std::vector<InetAddress> NetBSDEthernetTap::ips() const
316316
freeifaddrs(ifa);
317317

318318
std::sort(r.begin(), r.end());
319-
std::unique(r.begin(), r.end());
319+
r.erase(std::unique(r.begin(), r.end()), r.end());
320320

321321
return r;
322322
}
@@ -367,7 +367,7 @@ void NetBSDEthernetTap::scanMulticastGroups(std::vector<MulticastGroup>& added,
367367
newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip));
368368

369369
std::sort(newGroups.begin(), newGroups.end());
370-
std::unique(newGroups.begin(), newGroups.end());
370+
newGroups.erase(std::unique(newGroups.begin(), newGroups.end()), newGroups.end());
371371

372372
for (std::vector<MulticastGroup>::iterator m(newGroups.begin()); m != newGroups.end(); ++m) {
373373
if (! std::binary_search(_multicastGroups.begin(), _multicastGroups.end(), *m))

0 commit comments

Comments
 (0)