Compare commits

...
27 Commits
Author SHA1 Message Date
dimitriy-dade 79b98a4b35 replacing .aip file 2026-06-09 11:03:49 -04:00
dimitriy-dade 157c70ad07 fixing permissions for the daemon directory 2026-06-09 10:54:40 -04:00
Dimitriy Dade a3b1a346c4 Merge pull request #2592 from zerotier/cv1
bringing back cv1 yaml
2026-05-27 16:23:53 -04:00
dimitriy-dade 9c2d5cd74c bringing back cv1 yaml 2026-05-27 16:14:53 -04:00
Dimitriy Dade fc5c3ec220 Merge pull request #2590 from zerotier/1.16.2
Merging 1.16.2 from Private to Public
2026-05-27 14:42:28 -04:00
dimitriy-dade fe29cd8888 fixing changelogs as required by linux builds and version for Mac 2026-05-27 14:29:53 -04:00
dimitriy-dade 2ed9b86852 updated workflows 2026-05-22 19:56:47 -04:00
dimitriy-dade f87d5477f6 Merging 1.16.2 from Private to Public 2026-05-22 11:39:10 -04:00
countbinoculars 544809e738 Merge pull request #2588 from zerotier/dep-updates
Update some Rust dependencies
2026-05-21 15:53:07 -07:00
Chris Spiegel d678338b28 Update some Rust dependencies 2026-05-21 15:21:38 -07:00
Grant Limberg 7b747aff3b Merge pull request #2582 from zerotier/rust-dep-updates
Dependency update for rust deps
2026-04-27 11:54:32 -07:00
Grant Limberg 484d9e0d8c cargo update 2026-04-27 11:31:02 -07:00
Grant Limberg 55aa87c372 Merge pull request #2577 from zerotier/cv1-schema-change
Handle a few incoming CV1 schema changes
2026-04-17 14:04:29 -07:00
Grant Limberg aa586efbb5 query fix 2026-04-17 13:50:49 -07:00
Grant Limberg a2340bf60c add --provenance false to avoid $IMAGE is a manifest list error 2026-03-04 11:58:43 -08:00
Grant Limberg e918ec44d5 one last fix 2026-03-04 11:47:09 -08:00
Grant Limberg 34777b6bb4 another fix for multi-arch builds 2026-03-04 11:35:56 -08:00
Grant Limberg 97db010112 fix multi-arch manifest 2026-03-04 11:12:19 -08:00
Grant Limberg e81053aed7 fix build 2026-03-04 10:57:46 -08:00
Grant Limberg 91428eacae add github action for creating CV1 controller images 2026-03-04 10:51:13 -08:00
Grant Limberg 936801a51b update gitignore 2026-03-02 14:08:07 -08:00
Grant Limberg 8f1b213994 still use use_redis column 2026-03-02 14:08:02 -08:00
Grant Limberg 7f47b2ba8f update dockerfile to get around go stdlib bug in controller build 2026-03-02 14:07:53 -08:00
Grant Limberg eac140aa73 Update use of ztc_controller table for changes in progress in CV1. 2026-03-02 13:14:16 -08:00
Dimitriy Dade d9a7f62a5c Merge pull request #2568 from zerotier/dimitriy-dev
Updating versions that were flagged as vulnerable by Dependabot
2026-02-26 13:44:04 -05:00
dimitriy.dade 294af67370 Updating versions that were flagged as vulnerable by Dependabot 2026-02-25 17:00:20 -05:00
Adam Ierymenko 67648579b5 Merge pull request #2549 from zerotier/1.16.1
1.16.1
2026-01-20 11:53:31 -05:00
34 changed files with 1879 additions and 1719 deletions

No files matched your search

+2 -2
View File
@@ -90,7 +90,7 @@ jobs:
build_windows:
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: gitconfig
run: |
@@ -102,7 +102,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-apple-darwin
targets: x86_64-pc-windows-msvc
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
@@ -0,0 +1,67 @@
name: Central Controller CV1 Build and Push
on:
push:
pull_request:
workflow_dispatch:
jobs:
central_controller:
name: Central Controller CV1 Build
strategy:
matrix:
runner: [gha-runner-x64, gha-runner-arm64]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Docker Auth
run: echo "${{ secrets.PORTUS_PW }}" | docker login registry.zerotier.com -u ${{ secrets.PORTUS_USER }} --password-stdin
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Build & Push Docker Image
run: |
docker build --provenance false --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-${{ runner.arch }} -f ext/central-controller-docker/Dockerfile . --push
multi-arch-docker:
runs-on: gha-runner-x64
needs: central_controller
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Auth
run: echo "${{ secrets.PORTUS_PW }}" | docker login registry.zerotier.com -u ${{ secrets.PORTUS_USER }} --password-stdin
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Create and push multi-arch manifest
run: |
docker manifest create registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }} \
--amend registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-X64 \
--amend registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-ARM64
docker manifest push registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}
+5 -6
View File
@@ -12,26 +12,25 @@ jobs:
git config --global core.autocrlf input
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
targets: x86_64-unknown-linux-gnu
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
continue-on-error: false
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
zeroidc/
rustybits/
- name: validate-1m-linux
env:
+5
View File
@@ -91,6 +91,7 @@ debian/zerotier-one*.debhelper
debian/*.log
debian/zerotier-one.substvars
root-watcher/config.json
build/
# Java/Android/JNI build droppings
java/obj/
@@ -106,6 +107,7 @@ windows/WinUI/bin/
windows/ZeroTierOne/Debug/
/ext/installfiles/windows/chocolatey/zerotier-one/*.nupkg
# Miscellaneous mac/Xcode droppings
.Trashes
*.swp
@@ -141,3 +143,6 @@ __pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft
# local Claude configurations
.claude/*.local.*
+9 -1
View File
@@ -1,8 +1,16 @@
ZeroTier Release Notes
======
## 2025-12-22 -- Version 1.16.1
## 2026-05-20 -- Version 1.16.2
* Fixed line endings for the zttap300.inf for the Windows ARM x64 install.
* Internal updates to the central controller (CV1) including schema changes and a multi-architecture Docker build pipeline.
* Increased `ZT_MAX_NETWORK_SPECIALISTS` from 256 to 512 to accommodate users with large networks that exceeded the previous limit. The network config dictionary capacity was raised correspondingly.
* Resolved intermittent multi-minute delays when leaving one network and joining another under Windows.
* Compiler warning cleanup across the codebase, covering GCC 14, Clang 18, and Clang 21.
## 2025-12-22 -- Version 1.16.1
* Metrics collection is now disabled by default. It can be enabled via the `enableMetrics` setting in `local.conf`.
* Fix for an issue where metrics were not being recorded while running in daemon mode.
* Fix debug dumpfile being written to the root directory.
+2 -2
View File
@@ -1,8 +1,8 @@
zerotier-one (1.16.1) unstable; urgency=medium
zerotier-one (1.16.2) unstable; urgency=medium
* See RELEASE-NOTES.md for release notes.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Mon, 12 Dec 2025 01:00:00 -0700
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Wed, 27 May 2026 01:00:00 -0700
zerotier-one (1.16.0-2) unstable; urgency=medium
+2 -2
View File
@@ -3,8 +3,8 @@ FROM registry.zerotier.com/zerotier/ctlbuild:2025-07-14 AS builder
ADD . /ZeroTierOne
RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
FROM golang:bookworm AS go_base
RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
FROM golang:1.24.1-bookworm AS go_base
RUN GONOSUMDB=* GOFLAGS='-p=1' go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
FROM registry.zerotier.com/zerotier/ctlrun:2025-07-14 AS run_base
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
+1 -1
View File
@@ -702,7 +702,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false />
<key>VERSION</key>
<string>1.16.1</string>
<string>1.16.2</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -135,7 +135,7 @@ extern "C" {
/**
* Maximum number of "specialists" on a network -- bridges, relays, etc.
*/
#define ZT_MAX_NETWORK_SPECIALISTS 256
#define ZT_MAX_NETWORK_SPECIALISTS 512
/**
* Maximum number of multicast group subscriptions per network
-4
View File
@@ -472,10 +472,6 @@ central-controller-docker: _buildx FORCE
docker buildx build --platform linux/amd64,linux/arm64 --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=`git name-rev --name-only HEAD` . --push
@echo Image: registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP}
centralv2-controller-docker: _buildx FORCE
docker buildx build --platform linux/amd64,linux/arm64 --no-cache -t us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:$(shell git rev-parse --short HEAD) -f ext/central-controller-docker/Dockerfile --build-arg git_branch=`git name-rev --name-only HEAD` . --push
@echo Image: us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:$(shell git rev-parse --short HEAD)
debug: FORCE
make ZT_DEBUG=1 one
make ZT_DEBUG=1 selftest
+1 -2
View File
@@ -58,7 +58,6 @@ class Capability : public Credential {
Capability() : _nwid(0), _ts(0), _id(0), _maxCustodyChainLength(0), _ruleCount(0)
{
memset(_rules, 0, sizeof(_rules));
memset(_custody, 0, sizeof(_custody));
}
/**
@@ -513,7 +512,7 @@ class Capability : public Credential {
Address to;
Address from;
ECC::Signature signature;
} _custody[ZT_MAX_CAPABILITY_CUSTODY_CHAIN_LENGTH];
} _custody[ZT_MAX_CAPABILITY_CUSTODY_CHAIN_LENGTH] = {};
};
} // namespace ZeroTier
+3 -3
View File
@@ -35,7 +35,7 @@ namespace ZeroTier {
*/
class Identity {
public:
Identity() : _privateKey((ECC::Private*)0)
Identity() : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
}
@@ -43,14 +43,14 @@ class Identity {
{
}
Identity(const char* str) : _privateKey((ECC::Private*)0)
Identity(const char* str) : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
if (! fromString(str)) {
throw ZT_EXCEPTION_INVALID_SERIALIZED_DATA_INVALID_TYPE;
}
}
template <unsigned int C> Identity(const Buffer<C>& b, unsigned int startAt = 0) : _privateKey((ECC::Private*)0)
template <unsigned int C> Identity(const Buffer<C>& b, unsigned int startAt = 0) : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
deserialize(b, startAt);
}
+2 -2
View File
@@ -160,7 +160,7 @@ InetAddress::IpScope InetAddress::ipScope() const
void InetAddress::set(const void* ipBytes, unsigned int ipLen, unsigned int port)
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
if (ipLen == 4) {
uint32_t ipb[1];
memcpy(ipb, ipBytes, 4);
@@ -215,7 +215,7 @@ bool InetAddress::fromString(const char* ipSlashPort)
{
char buf[64];
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
if (! *ipSlashPort) {
return true;
+23 -23
View File
@@ -74,15 +74,15 @@ struct InetAddress : public sockaddr_storage {
InetAddress()
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
}
InetAddress(const InetAddress& a)
{
memcpy(this, &a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &a, sizeof(InetAddress));
}
InetAddress(const InetAddress* a)
{
memcpy(this, a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), a, sizeof(InetAddress));
}
InetAddress(const struct sockaddr_storage& ss)
{
@@ -132,7 +132,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const InetAddress& a)
{
if (&a != this) {
memcpy(this, &a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &a, sizeof(InetAddress));
}
return *this;
}
@@ -140,7 +140,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const InetAddress* a)
{
if (a != this) {
memcpy(this, a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), a, sizeof(InetAddress));
}
return *this;
}
@@ -148,7 +148,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_storage& ss)
{
if (reinterpret_cast<const InetAddress*>(&ss) != this) {
memcpy(this, &ss, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &ss, sizeof(InetAddress));
}
return *this;
}
@@ -156,7 +156,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_storage* ss)
{
if (reinterpret_cast<const InetAddress*>(ss) != this) {
memcpy(this, ss, sizeof(InetAddress));
memcpy(static_cast<void*>(this), ss, sizeof(InetAddress));
}
return *this;
}
@@ -164,8 +164,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, &sa, sizeof(struct sockaddr_in));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in));
}
return *this;
}
@@ -173,8 +173,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, sa, sizeof(struct sockaddr_in));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in));
}
return *this;
}
@@ -182,8 +182,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in6& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, &sa, sizeof(struct sockaddr_in6));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in6));
}
return *this;
}
@@ -191,8 +191,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in6* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, sa, sizeof(struct sockaddr_in6));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in6));
}
return *this;
}
@@ -200,13 +200,13 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
switch (sa.sa_family) {
case AF_INET:
memcpy(this, &sa, sizeof(struct sockaddr_in));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in));
break;
case AF_INET6:
memcpy(this, &sa, sizeof(struct sockaddr_in6));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in6));
break;
}
}
@@ -216,13 +216,13 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
switch (sa->sa_family) {
case AF_INET:
memcpy(this, sa, sizeof(struct sockaddr_in));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in));
break;
case AF_INET6:
memcpy(this, sa, sizeof(struct sockaddr_in6));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in6));
break;
}
}
@@ -513,7 +513,7 @@ struct InetAddress : public sockaddr_storage {
*/
inline void zero()
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
}
/**
@@ -635,7 +635,7 @@ struct InetAddress : public sockaddr_storage {
template <unsigned int C> inline unsigned int deserialize(const Buffer<C>& b, unsigned int startAt = 0)
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
unsigned int p = startAt;
switch (b[p++]) {
case 0:
+5 -9
View File
@@ -479,15 +479,11 @@ class Network {
int64_t _lastConfigUpdate;
struct _IncomingConfigChunk {
_IncomingConfigChunk()
{
memset(this, 0, sizeof(_IncomingConfigChunk));
}
uint64_t ts;
uint64_t updateId;
uint64_t haveChunkIds[ZT_NETWORK_MAX_UPDATE_CHUNKS];
unsigned long haveChunks;
unsigned long haveBytes;
uint64_t ts = 0;
uint64_t updateId = 0;
uint64_t haveChunkIds[ZT_NETWORK_MAX_UPDATE_CHUNKS]{};
unsigned long haveChunks = 0;
unsigned long haveBytes = 0;
Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> data;
};
_IncomingConfigChunk _incomingConfigChunks[ZT_NETWORK_MAX_INCOMING_UPDATES];
-1
View File
@@ -50,7 +50,6 @@ NetworkConfig::NetworkConfig()
name[0] = 0;
memset(specialists, 0, sizeof(uint64_t) * ZT_MAX_NETWORK_SPECIALISTS);
memset(routes, 0, sizeof(ZT_VirtualNetworkRoute) * ZT_MAX_NETWORK_ROUTES);
memset(staticIps, 0, sizeof(InetAddress) * ZT_MAX_ZT_ASSIGNED_ADDRESSES);
memset(rules, 0, sizeof(ZT_VirtualNetworkRule) * ZT_MAX_NETWORK_RULES);
memset(&dns, 0, sizeof(ZT_VirtualNetworkDNS));
memset(authenticationURL, 0, sizeof(authenticationURL));
+2 -2
View File
@@ -80,7 +80,7 @@ namespace ZeroTier {
// Dictionary capacity needed for max size network config
#define ZT_NETWORKCONFIG_DICT_CAPACITY \
(4096 + (sizeof(ZT_VirtualNetworkConfig)) + (sizeof(ZT_VirtualNetworkRule) * ZT_MAX_NETWORK_RULES) + (sizeof(Capability) * ZT_MAX_NETWORK_CAPABILITIES) + (sizeof(Tag) * ZT_MAX_NETWORK_TAGS) \
((4096 + 2048) + (sizeof(ZT_VirtualNetworkConfig)) + (sizeof(ZT_VirtualNetworkRule) * ZT_MAX_NETWORK_RULES) + (sizeof(Capability) * ZT_MAX_NETWORK_CAPABILITIES) + (sizeof(Tag) * ZT_MAX_NETWORK_TAGS) \
+ (sizeof(CertificateOfOwnership) * ZT_MAX_CERTIFICATES_OF_OWNERSHIP))
// Dictionary capacity needed for max size network meta-data
@@ -562,7 +562,7 @@ class NetworkConfig {
/**
* Static IP assignments
*/
InetAddress staticIps[ZT_MAX_ZT_ASSIGNED_ADDRESSES];
InetAddress staticIps[ZT_MAX_ZT_ASSIGNED_ADDRESSES] = {};
/**
* Base network rules
+11 -4
View File
@@ -472,6 +472,10 @@ ZT_ResultCode Node::leave(uint64_t nwid, void** uptr, void* tptr)
{
ZT_VirtualNetworkConfig ctmp;
void** nUserPtr = (void**)0;
// Keep a local SharedPtr to the network so we can call the destroy
// callback after releasing the lock, without leaving a window during
// which _networks still contains a destroyed-but-not-erased entry.
SharedPtr<Network> nwHold;
{
Mutex::Lock _l(_networks_m);
SharedPtr<Network>* nw = _networks.get(nwid);
@@ -485,16 +489,19 @@ ZT_ResultCode Node::leave(uint64_t nwid, void** uptr, void* tptr)
(*nw)->externalConfig(&ctmp);
(*nw)->destroy();
nUserPtr = (*nw)->userPtr();
// Move the SharedPtr out and erase the map entry atomically with
// destroy(), under the same lock. From here on _networks does not
// contain this nwid; a concurrent join() will construct fresh.
nwHold = *nw;
_networks.erase(nwid);
}
if (nUserPtr) {
RR->node->configureVirtualNetworkPort(tptr, nwid, nUserPtr, ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY, &ctmp);
}
{
Mutex::Lock _l(_networks_m);
_networks.erase(nwid);
}
// nwHold goes out of scope here, finally releasing the Network.
uint64_t tmp[2];
tmp[0] = nwid;
+1 -2
View File
@@ -67,7 +67,6 @@ void PacketMultiplexer::setUpPostDecodeReceiveThreads(unsigned int concurrency,
#endif
_enabled = true;
_concurrency = concurrency;
bool _enablePinning = cpuPinningEnabled;
for (unsigned int i = 0; i < _concurrency; ++i) {
fprintf(stderr, "Reserved queue for thread %d\n", i);
@@ -76,7 +75,7 @@ void PacketMultiplexer::setUpPostDecodeReceiveThreads(unsigned int concurrency,
// Each thread picks from its own queue to feed into the core
for (unsigned int i = 0; i < _concurrency; ++i) {
_rxThreads.push_back(std::thread([this, i, _enablePinning]() {
_rxThreads.push_back(std::thread([this, i]() {
fprintf(stderr, "Created post-decode packet ingestion thread %d\n", i);
PacketRecord* packet = nullptr;
Loaded 20 of 34 files, more files were not shown because too many files have changed in this diff. Show more