mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-18 20:47:53 +00:00
Merge branch 'dev' into ChrisCarini/addArchToSynologyDSM7
This commit is contained in:
commit
2f3ea8882b
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -43,13 +43,20 @@ jobs:
|
|||||||
# git config --global core.eol lf
|
# git config --global core.eol lf
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Rust
|
- name: Install Rust aarch64
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
- name: Install Rust x86_64
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
- name: Set up cargo cache
|
- name: Set up cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
|
@ -26,7 +26,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided you
|
|||||||
ZeroTier behind the scenes to operate a service not
|
ZeroTier behind the scenes to operate a service not
|
||||||
related to ZeroTier network administration.
|
related to ZeroTier network administration.
|
||||||
|
|
||||||
* Create Non-Open-Source Commercial Derviative Works
|
* Create Non-Open-Source Commercial Derivative Works
|
||||||
|
|
||||||
(2) Link or directly include the Licensed Work in a
|
(2) Link or directly include the Licensed Work in a
|
||||||
commercial or for-profit application or other product
|
commercial or for-profit application or other product
|
||||||
@ -47,7 +47,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided you
|
|||||||
services, social welfare, senior care, child care, and
|
services, social welfare, senior care, child care, and
|
||||||
the care of persons with disabilities.
|
the care of persons with disabilities.
|
||||||
|
|
||||||
Change Date: 2025-01-01
|
Change Date: 2026-01-01
|
||||||
|
|
||||||
Change License: Apache License version 2.0 as published by the Apache
|
Change License: Apache License version 2.0 as published by the Apache
|
||||||
Software Foundation
|
Software Foundation
|
||||||
|
28
README.md
28
README.md
@ -44,6 +44,12 @@ The base path contains the ZeroTier One service main entry point (`one.cpp`), se
|
|||||||
- `windows/`: Visual Studio solution files, Windows service code, and the Windows task bar app UI.
|
- `windows/`: Visual Studio solution files, Windows service code, and the Windows task bar app UI.
|
||||||
- `zeroidc/`: OIDC implementation used by ZeroTier service to log into SSO-enabled networks. (This part is written in Rust, and more Rust will be appearing in this repository in the future.)
|
- `zeroidc/`: OIDC implementation used by ZeroTier service to log into SSO-enabled networks. (This part is written in Rust, and more Rust will be appearing in this repository in the future.)
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
|
||||||
|
Please do pull requests off of the `dev` branch.
|
||||||
|
|
||||||
|
Releases are done by merging `dev` into `main` and then tagging and doing builds.
|
||||||
|
|
||||||
### Build and Platform Notes
|
### Build and Platform Notes
|
||||||
|
|
||||||
To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU make) is required and can be installed from packages or ports. For Windows there is a Visual Studio solution in `windows/`.
|
To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU make) is required and can be installed from packages or ports. For Windows there is a Visual Studio solution in `windows/`.
|
||||||
@ -81,7 +87,7 @@ On most distributions, macOS, and Windows, the installer will start the service
|
|||||||
|
|
||||||
A home folder for your system will automatically be created.
|
A home folder for your system will automatically be created.
|
||||||
|
|
||||||
The service is controlled via the JSON API, which by default is available at 127.0.0.1 port 9993. We include a *zerotier-cli* command line utility to make API calls for standard things like joining and leaving networks. The *authtoken.secret* file in the home folder contains the secret token for accessing this API. See [service/README.md](service/README.md) for API documentation.
|
The service is controlled via the JSON API, which by default is available at `127.0.0.1:9993`. It also listens on `0.0.0.0:9993` which is only usable if `allowManagementFrom` is properly configured in `local.conf`. We include a *zerotier-cli* command line utility to make API calls for standard things like joining and leaving networks. The *authtoken.secret* file in the home folder contains the secret token for accessing this API. See [service/README.md](service/README.md) for API documentation.
|
||||||
|
|
||||||
Here's where home folders live (by default) on each OS:
|
Here's where home folders live (by default) on each OS:
|
||||||
|
|
||||||
@ -169,3 +175,23 @@ Metrics are also available on disk in ZeroTier's working directory:
|
|||||||
| zt_peer_packet_errors | node_id | Counter | number of incoming packet errors from a peer |
|
| zt_peer_packet_errors | node_id | Counter | number of incoming packet errors from a peer |
|
||||||
|
|
||||||
If there are other metrics you'd like to see tracked, ask us in an Issue or send us a Pull Request!
|
If there are other metrics you'd like to see tracked, ask us in an Issue or send us a Pull Request!
|
||||||
|
|
||||||
|
### HTTP / App server
|
||||||
|
|
||||||
|
There is a static http file server suitable for hosting Single Page Apps at http://localhost:9993/app/<app-path>
|
||||||
|
|
||||||
|
Use `zerotier-cli info -j` to find your zerotier-one service's homeDir
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
cd $ZT_HOME
|
||||||
|
sudo mkdir -p app/app1
|
||||||
|
sudo mkdir -p app/appB
|
||||||
|
echo '<html><meta charset=utf-8><title>appA</title><body><h1>hello world A' | sudo tee app/appA/index.html
|
||||||
|
echo '<html><meta charset=utf-8><title>app2</title><body><h1>hello world 2' | sudo tee app/app2/index.html
|
||||||
|
curl -sL http://localhost:9993/app/appA http://localhost:9993/app/app2
|
||||||
|
```
|
||||||
|
|
||||||
|
Then visit [http://localhost:9993/app/app1/](http://localhost:9993/app/app1/) and [http://localhost:9993/app/appB/](http://localhost:9993/app/appB/)
|
||||||
|
|
||||||
|
Requests to paths don't exist return the app root index.html, as is customary for SPAs.
|
||||||
|
If you want, you can write some javascript that talks to the service or controller [api](https://docs.zerotier.com/service/v1).
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
ZeroTier Release Notes
|
ZeroTier Release Notes
|
||||||
======
|
======
|
||||||
|
|
||||||
|
# 2024-05-02 -- Version 1.14.0
|
||||||
|
|
||||||
|
* Linux I/O performance improvements under heavy load
|
||||||
|
* Improvements to multipath
|
||||||
|
* Fix for port rebinding "coma" bug after periods offline (some laptop users)
|
||||||
|
* Fixed a rules engine quirk/ambiguity (GitHub Issue #2200)
|
||||||
|
* Controller API enhancements: node names and other node meta-data
|
||||||
|
* Other bug fixes
|
||||||
|
|
||||||
# 2023-09-12 -- Version 1.12.2
|
# 2023-09-12 -- Version 1.12.2
|
||||||
|
|
||||||
* More improvements to macOS full tunnel mode.
|
* More improvements to macOS full tunnel mode.
|
||||||
@ -89,7 +98,7 @@ Note that releases are coming few and far between because most of our dev effort
|
|||||||
# 2022-04-25 -- Version 1.8.9
|
# 2022-04-25 -- Version 1.8.9
|
||||||
|
|
||||||
* Fixed a long-standing and strange bug that was causing sporadic "phantom" packet authentication failures. Not a security problem but could be behind sporadic reports of link failures under some conditions.
|
* Fixed a long-standing and strange bug that was causing sporadic "phantom" packet authentication failures. Not a security problem but could be behind sporadic reports of link failures under some conditions.
|
||||||
* Fized a memory leak in SSO/OIDC support.
|
* Fixed a memory leak in SSO/OIDC support.
|
||||||
* Fixed SSO/OIDC display error on CLI.
|
* Fixed SSO/OIDC display error on CLI.
|
||||||
* Fixed a bug causing nodes to sometimes fail to push certs to each other (primarily affects SSO/OIDC use cases).
|
* Fixed a bug causing nodes to sometimes fail to push certs to each other (primarily affects SSO/OIDC use cases).
|
||||||
* Fixed a deadlock bug on leaving SSO/OIDC managed networks.
|
* Fixed a deadlock bug on leaving SSO/OIDC managed networks.
|
||||||
@ -340,7 +349,7 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
|
|||||||
# 2017-04-20 -- Version 1.2.4
|
# 2017-04-20 -- Version 1.2.4
|
||||||
|
|
||||||
* Managed routes are now only bifurcated for the default route. This is a change in behavior, though few people will probably notice. Bifurcating all managed routes was causing more trouble than it was worth for most users.
|
* Managed routes are now only bifurcated for the default route. This is a change in behavior, though few people will probably notice. Bifurcating all managed routes was causing more trouble than it was worth for most users.
|
||||||
* Up to 2X crypto speedup on x86-64 (except Windows, which will take some porting) and 32-bit ARM platforms due to integration of fast assembly language implementations of Salsa20/12 from the [supercop](http://bench.cr.yp.to/supercop.html) code base. These were written by Daniel J. Bernstein and are in the public domain. My Macbook Pro (Core i5 2.8ghz) now does almost 1.5GiB/sec Salsa20/12 per core and a Raspberry Pi got a 2X boost. 64-bit ARM support and Windows support will take some work but should not be too hard.
|
* Up to 2X crypto speedup on x86-64 (except Windows, which will take some porting) and 32-bit ARM platforms due to integration of fast assembly language implementations of Salsa20/12 from the [supercop](http://bench.cr.yp.to/supercop.html) code base. These were written by Daniel J. Bernstein and are in the public domain. My MacBook Pro (Core i5 2.8ghz) now does almost 1.5GiB/sec Salsa20/12 per core and a Raspberry Pi got a 2X boost. 64-bit ARM support and Windows support will take some work but should not be too hard.
|
||||||
* Refactored code that manages credentials to greatly reduce memory use in most cases. This may also result in a small performance improvement.
|
* Refactored code that manages credentials to greatly reduce memory use in most cases. This may also result in a small performance improvement.
|
||||||
* Reworked and simplified path selection and priority logic to fix path instability and dead path persistence edge cases. There have been some sporadic reports of persistent path instabilities and dead paths hanging around that take minutes to resolve. These have proven difficult to reproduce in house, but hopefully this will fix them. In any case it seems to speed up path establishment in our tests and it makes the code simpler and more readable.
|
* Reworked and simplified path selection and priority logic to fix path instability and dead path persistence edge cases. There have been some sporadic reports of persistent path instabilities and dead paths hanging around that take minutes to resolve. These have proven difficult to reproduce in house, but hopefully this will fix them. In any case it seems to speed up path establishment in our tests and it makes the code simpler and more readable.
|
||||||
* Eliminated some unused cruft from the code around path management and in the peer class.
|
* Eliminated some unused cruft from the code around path management and in the peer class.
|
||||||
|
@ -8,10 +8,10 @@ includes all source code repositories managed through our GitHub organization.
|
|||||||
The following versions of ZeroTier One receive security updates
|
The following versions of ZeroTier One receive security updates
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ------------------ |
|
| -------- | ------------------ |
|
||||||
|
| 1.14.x | :white_check_mark: |
|
||||||
| 1.12.x | :white_check_mark: |
|
| 1.12.x | :white_check_mark: |
|
||||||
| 1.10.x | :white_check_mark: |
|
| < 1.12.0 | :x: |
|
||||||
| < 1.10.0 | :x: |
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
@ -23,7 +23,6 @@ please encrypt with our PGP key (see below).
|
|||||||
Please include the following information, or as much as you can provide to help us
|
Please include the following information, or as much as you can provide to help us
|
||||||
understand the nature and scope of the issue:
|
understand the nature and scope of the issue:
|
||||||
|
|
||||||
|
|
||||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||||
* Full paths of source file(s) related to the manifestation of the issue
|
* Full paths of source file(s) related to the manifestation of the issue
|
||||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
* The location of the affected source code (tag/branch/commit or direct URL)
|
||||||
@ -32,7 +31,6 @@ understand the nature and scope of the issue:
|
|||||||
* Proof-of-concept or exploit code (if possible)
|
* Proof-of-concept or exploit code (if possible)
|
||||||
* Impact of the issue, including how an attacker might exploit the issue
|
* Impact of the issue, including how an attacker might exploit the issue
|
||||||
|
|
||||||
|
|
||||||
## Preferred Languages
|
## Preferred Languages
|
||||||
|
|
||||||
We prefer all communications to be in English.
|
We prefer all communications to be in English.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -196,7 +196,7 @@ bool DB::get(const uint64_t networkId,nlohmann::json &network,std::vector<nlohma
|
|||||||
void DB::networks(std::set<uint64_t> &networks)
|
void DB::networks(std::set<uint64_t> &networks)
|
||||||
{
|
{
|
||||||
waitForReady();
|
waitForReady();
|
||||||
Metrics::db_get_member_list++;
|
Metrics::db_get_network_list++;
|
||||||
std::shared_lock<std::shared_mutex> l(_networks_l);
|
std::shared_lock<std::shared_mutex> l(_networks_l);
|
||||||
for(auto n=_networks.begin();n!=_networks.end();++n)
|
for(auto n=_networks.begin();n!=_networks.end();++n)
|
||||||
networks.insert(n->first);
|
networks.insert(n->first);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -869,11 +869,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
// Control plane Endpoints
|
// Control plane Endpoints
|
||||||
std::string controllerPath = "/controller";
|
std::string controllerPath = "/controller";
|
||||||
std::string networkListPath = "/controller/network";
|
std::string networkListPath = "/controller/network";
|
||||||
|
std::string networkListPath2 = "/unstable/controller/network";
|
||||||
std::string networkPath = "/controller/network/([0-9a-fA-F]{16})";
|
std::string networkPath = "/controller/network/([0-9a-fA-F]{16})";
|
||||||
std::string oldAndBustedNetworkCreatePath = "/controller/network/([0-9a-fA-F]{10})______";
|
std::string oldAndBustedNetworkCreatePath = "/controller/network/([0-9a-fA-F]{10})______";
|
||||||
std::string memberListPath = "/controller/network/([0-9a-fA-F]{16})/member";
|
std::string memberListPath = "/controller/network/([0-9a-fA-F]{16})/member";
|
||||||
|
std::string memberListPath2 = "/unstable/controller/network/([0-9a-fA-F]{16})/member";
|
||||||
std::string memberPath = "/controller/network/([0-9a-fA-F]{16})/member/([0-9a-fA-F]{10})";
|
std::string memberPath = "/controller/network/([0-9a-fA-F]{16})/member/([0-9a-fA-F]{10})";
|
||||||
|
|
||||||
|
|
||||||
auto controllerGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
auto controllerGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
char tmp[4096];
|
char tmp[4096];
|
||||||
const bool dbOk = _db.isReady();
|
const bool dbOk = _db.isReady();
|
||||||
@ -910,6 +913,52 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
s.Get(networkListPath, networkListGet);
|
s.Get(networkListPath, networkListGet);
|
||||||
sv6.Get(networkListPath, networkListGet);
|
sv6.Get(networkListPath, networkListGet);
|
||||||
|
|
||||||
|
auto networkListGet2 = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
|
std::set<uint64_t> networkIds;
|
||||||
|
_db.networks(networkIds);
|
||||||
|
|
||||||
|
auto meta = json::object();
|
||||||
|
auto data = json::array();
|
||||||
|
uint64_t networkCount = 0;
|
||||||
|
|
||||||
|
for(std::set<uint64_t>::const_iterator nwid(networkIds.begin()); nwid != networkIds.end(); ++nwid) {
|
||||||
|
json network;
|
||||||
|
if (!_db.get(*nwid, network)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<json> memTmp;
|
||||||
|
if (_db.get(*nwid, network, memTmp)) {
|
||||||
|
if (!network.is_null()) {
|
||||||
|
uint64_t authorizedCount = 0;
|
||||||
|
uint64_t totalCount = memTmp.size();
|
||||||
|
networkCount++;
|
||||||
|
|
||||||
|
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
|
||||||
|
bool a = OSUtils::jsonBool((*m)["authorized"], 0);
|
||||||
|
if (a) { authorizedCount++; }
|
||||||
|
}
|
||||||
|
|
||||||
|
auto nwMeta = json::object();
|
||||||
|
nwMeta["totalMemberCount"] = totalCount;
|
||||||
|
nwMeta["authorizedMemberCount"] = authorizedCount;
|
||||||
|
network["meta"] = nwMeta;
|
||||||
|
|
||||||
|
data.push_back(network);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
meta["networkCount"] = networkCount;
|
||||||
|
|
||||||
|
auto out = json::object();
|
||||||
|
out["data"] = data;
|
||||||
|
out["meta"] = meta;
|
||||||
|
|
||||||
|
setContent(req, res, out.dump());
|
||||||
|
};
|
||||||
|
s.Get(networkListPath2, networkListGet2);
|
||||||
|
sv6.Get(networkListPath2, networkListGet2);
|
||||||
|
|
||||||
auto networkGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
auto networkGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
auto networkID = req.matches[1];
|
auto networkID = req.matches[1];
|
||||||
uint64_t nwid = Utils::hexStrToU64(networkID.str().c_str());
|
uint64_t nwid = Utils::hexStrToU64(networkID.str().c_str());
|
||||||
@ -925,7 +974,7 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
sv6.Get(networkPath, networkGet);
|
sv6.Get(networkPath, networkGet);
|
||||||
|
|
||||||
auto createNewNetwork = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
auto createNewNetwork = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
fprintf(stderr, "creating new network (new style)\n");
|
// fprintf(stderr, "creating new network (new style)\n");
|
||||||
uint64_t nwid = 0;
|
uint64_t nwid = 0;
|
||||||
uint64_t nwidPrefix = (Utils::hexStrToU64(_signingIdAddressString.c_str()) << 24) & 0xffffffffff000000ULL;
|
uint64_t nwidPrefix = (Utils::hexStrToU64(_signingIdAddressString.c_str()) << 24) & 0xffffffffff000000ULL;
|
||||||
uint64_t nwidPostfix = 0;
|
uint64_t nwidPostfix = 0;
|
||||||
@ -1035,6 +1084,41 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
s.Get(memberListPath, memberListGet);
|
s.Get(memberListPath, memberListGet);
|
||||||
sv6.Get(memberListPath, memberListGet);
|
sv6.Get(memberListPath, memberListGet);
|
||||||
|
|
||||||
|
auto memberListGet2 = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
|
auto networkID = req.matches[1];
|
||||||
|
uint64_t nwid = Utils::hexStrToU64(networkID.str().c_str());
|
||||||
|
json network;
|
||||||
|
if (!_db.get(nwid, network)) {
|
||||||
|
res.status = 404;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto out = nlohmann::json::object();
|
||||||
|
auto meta = nlohmann::json::object();
|
||||||
|
std::vector<json> memTmp;
|
||||||
|
if (_db.get(nwid, network, memTmp)) {
|
||||||
|
uint64_t authorizedCount = 0;
|
||||||
|
uint64_t totalCount = memTmp.size();
|
||||||
|
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
|
||||||
|
bool a = OSUtils::jsonBool((*m)["authorized"], 0);
|
||||||
|
if (a) { authorizedCount++; }
|
||||||
|
}
|
||||||
|
|
||||||
|
meta["totalCount"] = totalCount;
|
||||||
|
meta["authorizedCount"] = authorizedCount;
|
||||||
|
|
||||||
|
out["data"] = memTmp;
|
||||||
|
out["meta"] = meta;
|
||||||
|
|
||||||
|
setContent(req, res, out.dump());
|
||||||
|
} else {
|
||||||
|
res.status = 404;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
s.Get(memberListPath2, memberListGet2);
|
||||||
|
sv6.Get(memberListPath2, memberListGet2);
|
||||||
|
|
||||||
auto memberGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
auto memberGet = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
auto networkID = req.matches[1];
|
auto networkID = req.matches[1];
|
||||||
auto memberID = req.matches[2];
|
auto memberID = req.matches[2];
|
||||||
@ -1057,6 +1141,12 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
auto memberID = req.matches[2].str();
|
auto memberID = req.matches[2].str();
|
||||||
uint64_t nwid = Utils::hexStrToU64(networkID.c_str());
|
uint64_t nwid = Utils::hexStrToU64(networkID.c_str());
|
||||||
uint64_t memid = Utils::hexStrToU64(memberID.c_str());
|
uint64_t memid = Utils::hexStrToU64(memberID.c_str());
|
||||||
|
|
||||||
|
if (!_db.hasNetwork(nwid)) {
|
||||||
|
res.status = 404;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
json network;
|
json network;
|
||||||
json member;
|
json member;
|
||||||
_db.get(nwid, network, memid, member);
|
_db.get(nwid, network, memid, member);
|
||||||
@ -1068,6 +1158,7 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
|||||||
if (b.count("noAutoAssignIps")) member["noAutoAssignIps"] = OSUtils::jsonBool(b["noAutoAssignIps"], false);
|
if (b.count("noAutoAssignIps")) member["noAutoAssignIps"] = OSUtils::jsonBool(b["noAutoAssignIps"], false);
|
||||||
if (b.count("authenticationExpiryTime")) member["authenticationExpiryTime"] = (uint64_t)OSUtils::jsonInt(b["authenticationExpiryTime"], 0ULL);
|
if (b.count("authenticationExpiryTime")) member["authenticationExpiryTime"] = (uint64_t)OSUtils::jsonInt(b["authenticationExpiryTime"], 0ULL);
|
||||||
if (b.count("authenticationURL")) member["authenticationURL"] = OSUtils::jsonString(b["authenticationURL"], "");
|
if (b.count("authenticationURL")) member["authenticationURL"] = OSUtils::jsonString(b["authenticationURL"], "");
|
||||||
|
if (b.count("name")) member["name"] = OSUtils::jsonString(b["name"], "");
|
||||||
|
|
||||||
if (b.count("remoteTraceTarget")) {
|
if (b.count("remoteTraceTarget")) {
|
||||||
const std::string rtt(OSUtils::jsonString(b["remoteTraceTarget"],""));
|
const std::string rtt(OSUtils::jsonString(b["remoteTraceTarget"],""));
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -136,7 +136,7 @@ void FileDB::eraseNetwork(const uint64_t networkId)
|
|||||||
char p[16384];
|
char p[16384];
|
||||||
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json",_networksPath.c_str(),networkId);
|
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json",_networksPath.c_str(),networkId);
|
||||||
OSUtils::rm(p);
|
OSUtils::rm(p);
|
||||||
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.16llx" ZT_PATH_SEPARATOR_S "member",_networksPath.c_str(),(unsigned long long)networkId);
|
OSUtils::ztsnprintf(p,sizeof(p),"%s" ZT_PATH_SEPARATOR_S "%.16llx",_networksPath.c_str(),(unsigned long long)networkId);
|
||||||
OSUtils::rmDashRf(p);
|
OSUtils::rmDashRf(p);
|
||||||
_networkChanged(network,nullJson,true);
|
_networkChanged(network,nullJson,true);
|
||||||
std::lock_guard<std::mutex> l(this->_online_l);
|
std::lock_guard<std::mutex> l(this->_online_l);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
zerotier-one (1.14.0) unstable; urgency=medium
|
||||||
|
|
||||||
|
* See RELEASE-NOTES.md for release notes.
|
||||||
|
|
||||||
|
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 19 Mar 2024 01:00:00 -0700
|
||||||
|
|
||||||
zerotier-one (1.12.2) unstable; urgency=medium
|
zerotier-one (1.12.2) unstable; urgency=medium
|
||||||
|
|
||||||
* See RELEASE-NOTES.md for release notes.
|
* See RELEASE-NOTES.md for release notes.
|
||||||
|
2
debian/copyright
vendored
2
debian/copyright
vendored
@ -12,7 +12,7 @@ License: ZeroTier BSL 1.1
|
|||||||
Use of this software is governed by the Business Source License included
|
Use of this software is governed by the Business Source License included
|
||||||
in the LICENSE.TXT file in the project's root directory.
|
in the LICENSE.TXT file in the project's root directory.
|
||||||
|
|
||||||
Change Date: 2025-01-01
|
Change Date: 2026-01-01
|
||||||
|
|
||||||
On the date above, in accordance with the Business Source License, use
|
On the date above, in accordance with the Business Source License, use
|
||||||
of this software will be governed by version 2.0 of the Apache License.
|
of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -3,4 +3,4 @@ Manual Pages and Other Documentation
|
|||||||
|
|
||||||
Use "./build.sh" to build the manual pages.
|
Use "./build.sh" to build the manual pages.
|
||||||
|
|
||||||
You'll need either NodeJS/npm installed (script will then automatically install the npm *marked-man* package) or */usr/bin/ronn*. The latter is a Ruby program packaged on some distributions as *rubygem-ronn* or *ruby-ronn* or installable as *gem install ronn*. The Node *marked-man* package and *ronn* from rubygems are two roughly equivalent alternatives for compiling MarkDown into roff/man format.
|
You'll need either Node.js/npm installed (script will then automatically install the npm *marked-man* package) or */usr/bin/ronn*. The latter is a Ruby program packaged on some distributions as *rubygem-ronn* or *ruby-ronn* or installable as *gem install ronn*. The Node *marked-man* package and *ronn* from RubyGems are two roughly equivalent alternatives for compiling Markdown into roff/man format.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -701,7 +701,7 @@
|
|||||||
<key>USE_HFS+_COMPRESSION</key>
|
<key>USE_HFS+_COMPRESSION</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>VERSION</key>
|
<key>VERSION</key>
|
||||||
<string>1.12.2</string>
|
<string>1.14.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>TYPE</key>
|
<key>TYPE</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
<ROW Property="AiFeatIcoZeroTierOne" Value="ZeroTierIcon.exe" Type="8"/>
|
<ROW Property="AiFeatIcoZeroTierOne" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
|
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
|
||||||
<ROW Property="ProductCode" Value="1033:{56528063-D8C2-43F4-97DB-C787E6A2D9DB} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{EC58088A-4E0F-4BD5-B0B2-FD81C803EEC4} " Type="16"/>
|
||||||
<ROW Property="ProductLanguage" Value="1033"/>
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
<ROW Property="ProductName" Value="ZeroTier One"/>
|
<ROW Property="ProductName" Value="ZeroTier One"/>
|
||||||
<ROW Property="ProductVersion" Value="1.12.2" Options="32"/>
|
<ROW Property="ProductVersion" Value="1.14.0" Options="32"/>
|
||||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
|
||||||
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
||||||
@ -62,7 +62,7 @@
|
|||||||
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier" DirectoryOptions="12"/>
|
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier" DirectoryOptions="12"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
<ROW Component="AI_CustomARPName" ComponentId="{A0629900-689C-4BD7-9315-85F05804DF03}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
<ROW Component="AI_CustomARPName" ComponentId="{8BC01817-02AC-4C44-A84C-0727BC5B6E22}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
||||||
<ROW Component="AI_DisableModify" ComponentId="{46FFA8C5-A0CB-4E05-9AD3-911D543DE8CA}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
|
<ROW Component="AI_DisableModify" ComponentId="{46FFA8C5-A0CB-4E05-9AD3-911D543DE8CA}" 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="AI_ExePath" ComponentId="{8E02B36C-7A19-429B-A93E-77A9261AC918}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
|
||||||
<ROW Component="APPDIR" ComponentId="{4DD7907D-D7FE-4CD6-B1A0-B5C1625F5133}" Directory_="APPDIR" Attributes="0"/>
|
<ROW Component="APPDIR" ComponentId="{4DD7907D-D7FE-4CD6-B1A0-B5C1625F5133}" Directory_="APPDIR" Attributes="0"/>
|
||||||
@ -124,7 +124,7 @@
|
|||||||
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
<ROW TimeStampUrl="http://timestamp.digicert.com" SignerDescription="ZeroTier One" DescriptionUrl="https://www.zerotier.com/" SignOptions="7" SignTool="5" UseSha256="1" KVTenantId="5300bf3b-0eff-4a5f-a63f-821e22ed1730" KVAppId="5f94d77e-b795-41fd-afe7-ec913b03c1d3" KVName="ZeroTier-CS" KVCertName="ZT-EV-CS" KVCertVersion="442c2d6f77874ff99eed4b36f5cb401c"/>
|
<ROW TimeStampUrl="http://timestamp.digicert.com" SignerDescription="ZeroTier One" DescriptionUrl="https://www.zerotier.com/" SignOptions="7" SignTool="5" UseSha256="1" KVTenantId="5300bf3b-0eff-4a5f-a63f-821e22ed1730" KVAppId="5f94d77e-b795-41fd-afe7-ec913b03c1d3" KVName="ZeroTier-CS" KVCertName="ZT-EV-CS-2024" KVCertVersion="64807be24d57468e895e2e577f430de2"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.FirewallExceptionComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.FirewallExceptionComponent">
|
||||||
<ROW FirewallException="ZeroTierOneUDP9993" Direction="1" Action="1" DisplayName="ZeroTier UDP/9993 In" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="UDP"/>
|
<ROW FirewallException="ZeroTierOneUDP9993" Direction="1" Action="1" DisplayName="ZeroTier UDP/9993 In" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="UDP"/>
|
||||||
@ -498,10 +498,10 @@
|
|||||||
<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"/>
|
<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>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
||||||
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="2" UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="0" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false" UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1" UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="12" UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Condition="1" Order="0" Flags="14" Text="[ProductVersion]" UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Condition="1" Order="0" Flags="14" Text="[ProductVersion]" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -1347,8 +1347,16 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
char ifname[ZT_MAX_PHYSIFNAME];
|
char ifname[ZT_MAX_PHYSIFNAME];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pointer to PhySocket object for this path
|
||||||
|
*/
|
||||||
uint64_t localSocket;
|
uint64_t localSocket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Local port corresponding to this path's localSocket
|
||||||
|
*/
|
||||||
|
uint16_t localPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is path expired?
|
* Is path expired?
|
||||||
*/
|
*/
|
||||||
|
@ -111,6 +111,44 @@ namespace {
|
|||||||
bool finishInitializing();
|
bool finishInitializing();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// RAII construct for calling AttachCurrentThread and DetachCurrent automatically
|
||||||
|
//
|
||||||
|
struct ScopedJNIThreadAttacher {
|
||||||
|
|
||||||
|
JavaVM *jvm;
|
||||||
|
JNIEnv **env_p;
|
||||||
|
jint getEnvRet;
|
||||||
|
|
||||||
|
ScopedJNIThreadAttacher(JavaVM *jvmIn, JNIEnv **env_pIn, jint getEnvRetIn) :
|
||||||
|
jvm(jvmIn),
|
||||||
|
env_p(env_pIn),
|
||||||
|
getEnvRet(getEnvRetIn) {
|
||||||
|
|
||||||
|
if (getEnvRet != JNI_EDETACHED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
jint attachCurrentThreadRet;
|
||||||
|
if ((attachCurrentThreadRet = jvm->AttachCurrentThread(env_p, NULL)) != JNI_OK) {
|
||||||
|
LOGE("Error calling AttachCurrentThread: %d", attachCurrentThreadRet);
|
||||||
|
assert(false && "Error calling AttachCurrentThread");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
~ScopedJNIThreadAttacher() {
|
||||||
|
|
||||||
|
if (getEnvRet != JNI_EDETACHED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
jint detachCurrentThreadRet;
|
||||||
|
if ((detachCurrentThreadRet = jvm->DetachCurrentThread()) != JNI_OK) {
|
||||||
|
LOGE("Error calling DetachCurrentThread: %d", detachCurrentThreadRet);
|
||||||
|
assert(false && "Error calling DetachCurrentThread");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This must return 0 on success. It can return any OS-dependent error code
|
* This must return 0 on success. It can return any OS-dependent error code
|
||||||
@ -194,7 +232,25 @@ namespace {
|
|||||||
assert(ref);
|
assert(ref);
|
||||||
assert(ref->node == node);
|
assert(ref->node == node);
|
||||||
JNIEnv *env;
|
JNIEnv *env;
|
||||||
GETENV(env, ref->jvm);
|
|
||||||
|
jint getEnvRet;
|
||||||
|
assert(ref->jvm);
|
||||||
|
getEnvRet = ref->jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
|
||||||
|
|
||||||
|
if (!(getEnvRet == JNI_OK || getEnvRet == JNI_EDETACHED)) {
|
||||||
|
LOGE("Error calling GetEnv: %d", getEnvRet);
|
||||||
|
assert(false && "Error calling GetEnv");
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Thread might actually be detached.
|
||||||
|
//
|
||||||
|
// e.g:
|
||||||
|
// https://github.com/zerotier/ZeroTierOne/blob/91e7ce87f09ac1cfdeaf6ff22c3cedcd93574c86/node/Switch.cpp#L519
|
||||||
|
//
|
||||||
|
// Make sure to attach if needed
|
||||||
|
//
|
||||||
|
ScopedJNIThreadAttacher attacher{ref->jvm, &env, getEnvRet};
|
||||||
|
|
||||||
if (env->ExceptionCheck()) {
|
if (env->ExceptionCheck()) {
|
||||||
LOGE("Unhandled pending exception");
|
LOGE("Unhandled pending exception");
|
||||||
|
@ -62,7 +62,7 @@ ifeq ($(ZT_DEBUG),1)
|
|||||||
override CFLAGS+=-Wall -Wno-deprecated -g -O -pthread $(INCLUDES) $(DEFS)
|
override CFLAGS+=-Wall -Wno-deprecated -g -O -pthread $(INCLUDES) $(DEFS)
|
||||||
override CXXFLAGS+=-Wall -Wno-deprecated -g -O -std=c++17 -pthread $(INCLUDES) $(DEFS)
|
override CXXFLAGS+=-Wall -Wno-deprecated -g -O -std=c++17 -pthread $(INCLUDES) $(DEFS)
|
||||||
ZT_TRACE=1
|
ZT_TRACE=1
|
||||||
RUSTFLAGS=
|
ZT_CARGO_FLAGS=
|
||||||
# The following line enables optimization for the crypto code, since
|
# The following line enables optimization for the crypto code, since
|
||||||
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
|
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
|
||||||
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
||||||
@ -72,7 +72,7 @@ else
|
|||||||
CXXFLAGS?=-O3 -fstack-protector
|
CXXFLAGS?=-O3 -fstack-protector
|
||||||
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||||
LDFLAGS=-pie -Wl,-z,relro,-z,now
|
LDFLAGS=-pie -Wl,-z,relro,-z,now
|
||||||
RUSTFLAGS=--release
|
ZT_CARGO_FLAGS=--release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ZT_QNAP), 1)
|
ifeq ($(ZT_QNAP), 1)
|
||||||
@ -438,8 +438,7 @@ debug: FORCE
|
|||||||
ifeq ($(ZT_SSO_SUPPORTED), 1)
|
ifeq ($(ZT_SSO_SUPPORTED), 1)
|
||||||
ifeq ($(ZT_EMBEDDED),)
|
ifeq ($(ZT_EMBEDDED),)
|
||||||
zeroidc: FORCE
|
zeroidc: FORCE
|
||||||
# export PATH=/root/.cargo/bin:$$PATH; cd zeroidc && cargo build -j1 $(RUSTFLAGS)
|
export PATH=/${HOME}/.cargo/bin:$$PATH; cd rustybits && cargo build $(ZT_CARGO_FLAGS) -p zeroidc
|
||||||
export PATH=/${HOME}/.cargo/bin:$$PATH; cd rustybits && cargo build $(RUSTFLAGS) -p zeroidc
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
zeroidc:
|
zeroidc:
|
||||||
@ -447,7 +446,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(ZT_CONTROLLER), 1)
|
ifeq ($(ZT_CONTROLLER), 1)
|
||||||
smeeclient: FORCE
|
smeeclient: FORCE
|
||||||
export PATH=/${HOME}/.cargo/bin:$$PATH; cd rustybits && cargo build $(RUSTFLAGS) -p smeeclient
|
export PATH=/${HOME}/.cargo/bin:$$PATH; cd rustybits && cargo build $(ZT_CARGO_FLAGS) -p smeeclient
|
||||||
else
|
else
|
||||||
smeeclient:
|
smeeclient:
|
||||||
endif
|
endif
|
||||||
|
13
make-mac.mk
13
make-mac.mk
@ -12,7 +12,8 @@ PRODUCTSIGN=echo
|
|||||||
CODESIGN_APP_CERT=
|
CODESIGN_APP_CERT=
|
||||||
CODESIGN_INSTALLER_CERT=
|
CODESIGN_INSTALLER_CERT=
|
||||||
NOTARIZE=echo
|
NOTARIZE=echo
|
||||||
NOTARIZE_USER_ID=null
|
NOTARIZE_APPLE_ID=null
|
||||||
|
NOTARIZE_TEAM_ID=null
|
||||||
|
|
||||||
ZT_BUILD_PLATFORM=3
|
ZT_BUILD_PLATFORM=3
|
||||||
ZT_BUILD_ARCHITECTURE=2
|
ZT_BUILD_ARCHITECTURE=2
|
||||||
@ -38,8 +39,9 @@ ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
|||||||
PRODUCTSIGN=productsign
|
PRODUCTSIGN=productsign
|
||||||
CODESIGN_APP_CERT="Developer ID Application: ZeroTier, Inc (8ZD9JUCZ4V)"
|
CODESIGN_APP_CERT="Developer ID Application: ZeroTier, Inc (8ZD9JUCZ4V)"
|
||||||
CODESIGN_INSTALLER_CERT="Developer ID Installer: ZeroTier, Inc (8ZD9JUCZ4V)"
|
CODESIGN_INSTALLER_CERT="Developer ID Installer: ZeroTier, Inc (8ZD9JUCZ4V)"
|
||||||
NOTARIZE=xcrun altool
|
NOTARIZE=xcrun notarytool
|
||||||
NOTARIZE_USER_ID="adam.ierymenko@gmail.com"
|
NOTARIZE_APPLE_ID="adam.ierymenko@gmail.com"
|
||||||
|
NOTARIZE_TEAM_ID="8ZD9JUCZ4V"
|
||||||
else
|
else
|
||||||
DEFS+=-DZT_SOFTWARE_UPDATE_DEFAULT="\"download\""
|
DEFS+=-DZT_SOFTWARE_UPDATE_DEFAULT="\"download\""
|
||||||
endif
|
endif
|
||||||
@ -166,7 +168,7 @@ mac-dist-pkg: FORCE
|
|||||||
if [ -f "ZeroTier One Signed.pkg" ]; then mv -f "ZeroTier One Signed.pkg" "ZeroTier One.pkg"; fi
|
if [ -f "ZeroTier One Signed.pkg" ]; then mv -f "ZeroTier One Signed.pkg" "ZeroTier One.pkg"; fi
|
||||||
rm -f zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_*
|
rm -f zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_*
|
||||||
cat ext/installfiles/mac-update/updater.tmpl.sh "ZeroTier One.pkg" >zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_$(ZT_VERSION_MAJOR).$(ZT_VERSION_MINOR).$(ZT_VERSION_REV)_$(ZT_VERSION_BUILD).exe
|
cat ext/installfiles/mac-update/updater.tmpl.sh "ZeroTier One.pkg" >zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_$(ZT_VERSION_MAJOR).$(ZT_VERSION_MINOR).$(ZT_VERSION_REV)_$(ZT_VERSION_BUILD).exe
|
||||||
$(NOTARIZE) -t osx -f "ZeroTier One.pkg" --primary-bundle-id com.zerotier.pkg.ZeroTierOne --output-format xml --notarize-app -u $(NOTARIZE_USER_ID)
|
$(NOTARIZE) submit --apple-id "adam.ierymenko@gmail.com" --team-id "8ZD9JUCZ4V" --wait "ZeroTier One.pkg"
|
||||||
echo '*** When Apple notifies that the app is notarized, run: xcrun stapler staple "ZeroTier One.pkg"'
|
echo '*** When Apple notifies that the app is notarized, run: xcrun stapler staple "ZeroTier One.pkg"'
|
||||||
|
|
||||||
# For ZeroTier, Inc. to build official signed packages
|
# For ZeroTier, Inc. to build official signed packages
|
||||||
@ -186,6 +188,9 @@ _buildx:
|
|||||||
controller-builder: _buildx FORCE
|
controller-builder: _buildx FORCE
|
||||||
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier/ctlbuild:latest -f ext/central-controller-docker/Dockerfile.builder . --push
|
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier/ctlbuild:latest -f ext/central-controller-docker/Dockerfile.builder . --push
|
||||||
|
|
||||||
|
controller-run: _buildx FORCE
|
||||||
|
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier-central/ctlrun:latest -f ext/central-controller-docker/Dockerfile.run_base . --push
|
||||||
|
|
||||||
central-controller-docker: _buildx FORCE
|
central-controller-docker: _buildx FORCE
|
||||||
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=$(shell git name-rev --name-only HEAD) . --push
|
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=$(shell git name-rev --name-only HEAD) . --push
|
||||||
@echo Image: registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP}
|
@echo Image: registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
#include "Switch.hpp"
|
#include "Switch.hpp"
|
||||||
|
|
||||||
|
#include <cinttypes> // for PRId64, etc. macros
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cinttypes> // for PRId64, etc. macros
|
|
||||||
|
|
||||||
// FIXME: remove this suppression and actually fix warnings
|
// FIXME: remove this suppression and actually fix warnings
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
@ -108,7 +108,7 @@ bool Bond::setAllMtuByTuple(uint16_t mtu, const std::string& ifStr, const std::s
|
|||||||
std::map<int64_t, SharedPtr<Bond> >::iterator bondItr = _bonds.begin();
|
std::map<int64_t, SharedPtr<Bond> >::iterator bondItr = _bonds.begin();
|
||||||
bool found = false;
|
bool found = false;
|
||||||
while (bondItr != _bonds.end()) {
|
while (bondItr != _bonds.end()) {
|
||||||
if (bondItr->second->setMtuByTuple(mtu,ifStr,ipStr)) {
|
if (bondItr->second->setMtuByTuple(mtu, ifStr, ipStr)) {
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
++bondItr;
|
++bondItr;
|
||||||
@ -154,11 +154,13 @@ SharedPtr<Bond> Bond::createBond(const RuntimeEnvironment* renv, const SharedPtr
|
|||||||
bond = new Bond(renv, _bondPolicyTemplates[_defaultPolicyStr].ptr(), peer);
|
bond = new Bond(renv, _bondPolicyTemplates[_defaultPolicyStr].ptr(), peer);
|
||||||
bond->debug("new default custom bond (based on %s)", bond->getPolicyStrByCode(bond->policy()).c_str());
|
bond->debug("new default custom bond (based on %s)", bond->getPolicyStrByCode(bond->policy()).c_str());
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (! _bondPolicyTemplates[_policyTemplateAssignments[identity]]) {
|
if (! _bondPolicyTemplates[_policyTemplateAssignments[identity]]) {
|
||||||
bond = new Bond(renv, _defaultPolicy, peer);
|
bond = new Bond(renv, _defaultPolicy, peer);
|
||||||
bond->debug("peer-specific bond, was specified as %s but the bond definition was not found, using default %s", _policyTemplateAssignments[identity].c_str(), getPolicyStrByCode(_defaultPolicy).c_str());
|
bond->debug("peer-specific bond, was specified as %s but the bond definition was not found, using default %s", _policyTemplateAssignments[identity].c_str(), getPolicyStrByCode(_defaultPolicy).c_str());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
bond = new Bond(renv, _bondPolicyTemplates[_policyTemplateAssignments[identity]].ptr(), peer);
|
bond = new Bond(renv, _bondPolicyTemplates[_policyTemplateAssignments[identity]].ptr(), peer);
|
||||||
bond->debug("new default bond");
|
bond->debug("new default bond");
|
||||||
}
|
}
|
||||||
@ -227,10 +229,12 @@ SharedPtr<Link> Bond::getLinkBySocket(const std::string& policyAlias, uint64_t l
|
|||||||
SharedPtr<Link> s = new Link(ifnameStr, 0, 0, 0, true, ZT_BOND_SLAVE_MODE_PRIMARY, "");
|
SharedPtr<Link> s = new Link(ifnameStr, 0, 0, 0, true, ZT_BOND_SLAVE_MODE_PRIMARY, "");
|
||||||
_interfaceToLinkMap[policyAlias].insert(std::pair<std::string, SharedPtr<Link> >(ifnameStr, s));
|
_interfaceToLinkMap[policyAlias].insert(std::pair<std::string, SharedPtr<Link> >(ifnameStr, s));
|
||||||
return s;
|
return s;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return SharedPtr<Link>();
|
return SharedPtr<Link>();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return search->second;
|
return search->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,6 +344,7 @@ void Bond::nominatePathToBond(const SharedPtr<Path>& path, int64_t now)
|
|||||||
_paths[i].ipvPref = sl->ipvPref();
|
_paths[i].ipvPref = sl->ipvPref();
|
||||||
_paths[i].mode = sl->mode();
|
_paths[i].mode = sl->mode();
|
||||||
_paths[i].enabled = sl->enabled();
|
_paths[i].enabled = sl->enabled();
|
||||||
|
_paths[i].localPort = _phy->getLocalPort((PhySocket*)((uintptr_t)path->localSocket()));
|
||||||
_paths[i].onlyPathOnLink = ! bFoundCommonLink;
|
_paths[i].onlyPathOnLink = ! bFoundCommonLink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,7 +402,8 @@ SharedPtr<Path> Bond::getAppropriatePath(int64_t now, int32_t flowId)
|
|||||||
_rrPacketsSentOnCurrLink = 0;
|
_rrPacketsSentOnCurrLink = 0;
|
||||||
if (_numBondedPaths == 1 || _rrIdx >= (ZT_MAX_PEER_NETWORK_PATHS - 1)) {
|
if (_numBondedPaths == 1 || _rrIdx >= (ZT_MAX_PEER_NETWORK_PATHS - 1)) {
|
||||||
_rrIdx = 0;
|
_rrIdx = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
int _tempIdx = _rrIdx;
|
int _tempIdx = _rrIdx;
|
||||||
for (int searchCount = 0; searchCount < (_numBondedPaths - 1); searchCount++) {
|
for (int searchCount = 0; searchCount < (_numBondedPaths - 1); searchCount++) {
|
||||||
_tempIdx = (_tempIdx == (_numBondedPaths - 1)) ? 0 : _tempIdx + 1;
|
_tempIdx = (_tempIdx == (_numBondedPaths - 1)) ? 0 : _tempIdx + 1;
|
||||||
@ -427,7 +433,8 @@ SharedPtr<Path> Bond::getAppropriatePath(int64_t now, int32_t flowId)
|
|||||||
if (likely(it != _flows.end())) {
|
if (likely(it != _flows.end())) {
|
||||||
it->second->lastActivity = now;
|
it->second->lastActivity = now;
|
||||||
return _paths[it->second->assignedPath].p;
|
return _paths[it->second->assignedPath].p;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
unsigned char entropy;
|
unsigned char entropy;
|
||||||
Utils::getSecureRandom(&entropy, 1);
|
Utils::getSecureRandom(&entropy, 1);
|
||||||
SharedPtr<Flow> flow = createFlow(ZT_MAX_PEER_NETWORK_PATHS, flowId, entropy, now);
|
SharedPtr<Flow> flow = createFlow(ZT_MAX_PEER_NETWORK_PATHS, flowId, entropy, now);
|
||||||
@ -505,7 +512,8 @@ void Bond::recordIncomingPacket(const SharedPtr<Path>& path, uint64_t packetId,
|
|||||||
_paths[pathIdx].qosStatsIn[packetId] = now;
|
_paths[pathIdx].qosStatsIn[packetId] = now;
|
||||||
++(_paths[pathIdx].packetsReceivedSinceLastQoS);
|
++(_paths[pathIdx].packetsReceivedSinceLastQoS);
|
||||||
//_paths[pathIdx].packetValiditySamples.push(true);
|
//_paths[pathIdx].packetValiditySamples.push(true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// debug("QoS buffer full, will not record information");
|
// debug("QoS buffer full, will not record information");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -532,7 +540,8 @@ void Bond::recordIncomingPacket(const SharedPtr<Path>& path, uint64_t packetId,
|
|||||||
SharedPtr<Flow> flow;
|
SharedPtr<Flow> flow;
|
||||||
if (! _flows.count(flowId)) {
|
if (! _flows.count(flowId)) {
|
||||||
flow = createFlow(pathIdx, flowId, 0, now);
|
flow = createFlow(pathIdx, flowId, 0, now);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
flow = _flows[flowId];
|
flow = _flows[flowId];
|
||||||
}
|
}
|
||||||
if (flow) {
|
if (flow) {
|
||||||
@ -618,7 +627,8 @@ bool Bond::assignFlowToBondedPath(SharedPtr<Flow>& flow, int64_t now, bool reass
|
|||||||
|
|
||||||
if (reassign) {
|
if (reassign) {
|
||||||
log("attempting to re-assign out-flow %04x previously on idx %d (%u / %zu flows)", flow->id, flow->assignedPath, _paths[_realIdxMap[flow->assignedPath]].assignedFlowCount, _flows.size());
|
log("attempting to re-assign out-flow %04x previously on idx %d (%u / %zu flows)", flow->id, flow->assignedPath, _paths[_realIdxMap[flow->assignedPath]].assignedFlowCount, _flows.size());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
debug("attempting to assign flow for the first time");
|
debug("attempting to assign flow for the first time");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +642,8 @@ bool Bond::assignFlowToBondedPath(SharedPtr<Flow>& flow, int64_t now, bool reass
|
|||||||
|
|
||||||
if (reassign) {
|
if (reassign) {
|
||||||
bondedIdx = (flow->assignedPath + offset) % (_numBondedPaths);
|
bondedIdx = (flow->assignedPath + offset) % (_numBondedPaths);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
bondedIdx = abs((int)((entropy + offset) % (_numBondedPaths)));
|
bondedIdx = abs((int)((entropy + offset) % (_numBondedPaths)));
|
||||||
}
|
}
|
||||||
// debug("idx=%d, offset=%d, randomCap=%f, actualCap=%f", bondedIdx, offset, randomLinkCapacity, _paths[_realIdxMap[bondedIdx]].relativeLinkCapacity);
|
// debug("idx=%d, offset=%d, randomCap=%f, actualCap=%f", bondedIdx, offset, randomLinkCapacity, _paths[_realIdxMap[bondedIdx]].relativeLinkCapacity);
|
||||||
@ -655,7 +666,8 @@ bool Bond::assignFlowToBondedPath(SharedPtr<Flow>& flow, int64_t now, bool reass
|
|||||||
flow->assignPath(_realIdxMap[bondedIdx], now);
|
flow->assignPath(_realIdxMap[bondedIdx], now);
|
||||||
++(_paths[_realIdxMap[bondedIdx]].assignedFlowCount);
|
++(_paths[_realIdxMap[bondedIdx]].assignedFlowCount);
|
||||||
// debug(" ABLE to find optimal link %f idx %d", _paths[_realIdxMap[bondedIdx]].relativeQuality, bondedIdx);
|
// debug(" ABLE to find optimal link %f idx %d", _paths[_realIdxMap[bondedIdx]].relativeQuality, bondedIdx);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// We were (unable) to find a path that didn't violate at least one quality requirement, will choose next best option
|
// We were (unable) to find a path that didn't violate at least one quality requirement, will choose next best option
|
||||||
flow->assignPath(_realIdxMap[nextBestQualIdx], now);
|
flow->assignPath(_realIdxMap[nextBestQualIdx], now);
|
||||||
++(_paths[_realIdxMap[nextBestQualIdx]].assignedFlowCount);
|
++(_paths[_realIdxMap[nextBestQualIdx]].assignedFlowCount);
|
||||||
@ -715,11 +727,13 @@ void Bond::forgetFlowsWhenNecessary(uint64_t age, bool oldest, int64_t now)
|
|||||||
debug("forget flow %04x (age %" PRId64 ") (%u / %zu)", it->first, it->second->age(now), _paths[it->second->assignedPath].assignedFlowCount, (_flows.size() - 1));
|
debug("forget flow %04x (age %" PRId64 ") (%u / %zu)", it->first, it->second->age(now), _paths[it->second->assignedPath].assignedFlowCount, (_flows.size() - 1));
|
||||||
_paths[it->second->assignedPath].assignedFlowCount--;
|
_paths[it->second->assignedPath].assignedFlowCount--;
|
||||||
it = _flows.erase(it);
|
it = _flows.erase(it);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (oldest) { // Remove single oldest by natural expiration
|
}
|
||||||
|
else if (oldest) { // Remove single oldest by natural expiration
|
||||||
uint64_t maxAge = 0;
|
uint64_t maxAge = 0;
|
||||||
while (it != _flows.end()) {
|
while (it != _flows.end()) {
|
||||||
if (it->second->age(now) > maxAge) {
|
if (it->second->age(now) > maxAge) {
|
||||||
@ -766,7 +780,8 @@ void Bond::processIncomingPathNegotiationRequest(uint64_t now, SharedPtr<Path>&
|
|||||||
if (_peer->_id.address().toInt() > RR->node->identity().address().toInt()) {
|
if (_peer->_id.address().toInt() > RR->node->identity().address().toInt()) {
|
||||||
debug("agree with peer to use alternate link %s/%s\n", link->ifname().c_str(), pathStr);
|
debug("agree with peer to use alternate link %s/%s\n", link->ifname().c_str(), pathStr);
|
||||||
_negotiatedPathIdx = pathIdx;
|
_negotiatedPathIdx = pathIdx;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
debug("ignore petition from peer to use alternate link %s/%s\n", link->ifname().c_str(), pathStr);
|
debug("ignore petition from peer to use alternate link %s/%s\n", link->ifname().c_str(), pathStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -881,7 +896,8 @@ void Bond::sendQOS_MEASUREMENT(void* tPtr, int pathIdx, int64_t localSocket, con
|
|||||||
if (atAddress) {
|
if (atAddress) {
|
||||||
outp.armor(_peer->key(), false, _peer->aesKeysIfSupported());
|
outp.armor(_peer->key(), false, _peer->aesKeysIfSupported());
|
||||||
RR->node->putPacket(tPtr, localSocket, atAddress, outp.data(), outp.size());
|
RR->node->putPacket(tPtr, localSocket, atAddress, outp.data(), outp.size());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
RR->sw->send(tPtr, outp, false);
|
RR->sw->send(tPtr, outp, false);
|
||||||
}
|
}
|
||||||
Metrics::pkt_qos_out++;
|
Metrics::pkt_qos_out++;
|
||||||
@ -1078,6 +1094,7 @@ void Bond::curateBond(int64_t now, bool rebuildBond)
|
|||||||
* Curate the set of paths that are part of the bond proper. Select a set of paths
|
* Curate the set of paths that are part of the bond proper. Select a set of paths
|
||||||
* per logical link according to eligibility and user-specified constraints.
|
* per logical link according to eligibility and user-specified constraints.
|
||||||
*/
|
*/
|
||||||
|
int updatedBondedPathCount = 0;
|
||||||
if ((_policy == ZT_BOND_POLICY_BALANCE_RR) || (_policy == ZT_BOND_POLICY_BALANCE_XOR) || (_policy == ZT_BOND_POLICY_BALANCE_AWARE)) {
|
if ((_policy == ZT_BOND_POLICY_BALANCE_RR) || (_policy == ZT_BOND_POLICY_BALANCE_XOR) || (_policy == ZT_BOND_POLICY_BALANCE_AWARE)) {
|
||||||
if (! _numBondedPaths) {
|
if (! _numBondedPaths) {
|
||||||
rebuildBond = true;
|
rebuildBond = true;
|
||||||
@ -1089,7 +1106,6 @@ void Bond::curateBond(int64_t now, bool rebuildBond)
|
|||||||
_paths[i].bonded = false;
|
_paths[i].bonded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int updatedBondedPathCount = 0;
|
|
||||||
// Build map associating paths with local physical links. Will be selected from in next step
|
// Build map associating paths with local physical links. Will be selected from in next step
|
||||||
std::map<SharedPtr<Link>, std::vector<int> > linkMap;
|
std::map<SharedPtr<Link>, std::vector<int> > linkMap;
|
||||||
for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) {
|
for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) {
|
||||||
@ -1191,6 +1207,14 @@ void Bond::curateBond(int64_t now, bool rebuildBond)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_policy == ZT_BOND_POLICY_ACTIVE_BACKUP) {
|
||||||
|
for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) {
|
||||||
|
if (_paths[i].p && _paths[i].bonded) {
|
||||||
|
updatedBondedPathCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_numBondedPaths = updatedBondedPathCount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bond::estimatePathQuality(int64_t now)
|
void Bond::estimatePathQuality(int64_t now)
|
||||||
@ -1222,7 +1246,8 @@ void Bond::estimatePathQuality(int64_t now)
|
|||||||
if ((now - it->second) >= qosRecordTimeout) {
|
if ((now - it->second) >= qosRecordTimeout) {
|
||||||
it = _paths[i].qosStatsOut.erase(it);
|
it = _paths[i].qosStatsOut.erase(it);
|
||||||
++numDroppedQosOutRecords;
|
++numDroppedQosOutRecords;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1250,7 +1275,8 @@ void Bond::estimatePathQuality(int64_t now)
|
|||||||
if ((now - it->second) >= qosRecordTimeout) {
|
if ((now - it->second) >= qosRecordTimeout) {
|
||||||
it = _paths[i].qosStatsIn.erase(it);
|
it = _paths[i].qosStatsIn.erase(it);
|
||||||
++numDroppedQosInRecords;
|
++numDroppedQosInRecords;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1327,10 +1353,10 @@ void Bond::estimatePathQuality(int64_t now)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Compute/Smooth average of real-world observations
|
// Compute/Smooth average of real-world observations
|
||||||
if (_paths[i].latencySamples.count() == ZT_QOS_SHORTTERM_SAMPLE_WIN_SIZE) {
|
if (_paths[i].latencySamples.count() >= ZT_QOS_SHORTTERM_SAMPLE_WIN_MIN_REQ_SIZE) {
|
||||||
_paths[i].latency = _paths[i].latencySamples.mean();
|
_paths[i].latency = _paths[i].latencySamples.mean();
|
||||||
}
|
}
|
||||||
if (_paths[i].latencySamples.count() == ZT_QOS_SHORTTERM_SAMPLE_WIN_SIZE) {
|
if (_paths[i].latencySamples.count() >= ZT_QOS_SHORTTERM_SAMPLE_WIN_MIN_REQ_SIZE) {
|
||||||
_paths[i].latencyVariance = _paths[i].latencySamples.stddev();
|
_paths[i].latencyVariance = _paths[i].latencySamples.stddev();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1344,6 +1370,7 @@ void Bond::estimatePathQuality(int64_t now)
|
|||||||
//_paths[i].packetErrorRatio = 1.0 - (_paths[i].packetValiditySamples.count() ? _paths[i].packetValiditySamples.mean() : 1.0);
|
//_paths[i].packetErrorRatio = 1.0 - (_paths[i].packetValiditySamples.count() ? _paths[i].packetValiditySamples.mean() : 1.0);
|
||||||
// _valid is written elsewhere
|
// _valid is written elsewhere
|
||||||
_paths[i].p->_relativeQuality = _paths[i].relativeQuality;
|
_paths[i].p->_relativeQuality = _paths[i].relativeQuality;
|
||||||
|
_paths[i].p->_localPort = _paths[i].localPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flag links for avoidance
|
// Flag links for avoidance
|
||||||
@ -1370,7 +1397,8 @@ void Bond::estimatePathQuality(int64_t now)
|
|||||||
shouldAvoid = true;
|
shouldAvoid = true;
|
||||||
}
|
}
|
||||||
_paths[i].shouldAvoid = shouldAvoid;
|
_paths[i].shouldAvoid = shouldAvoid;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (! shouldAvoid) {
|
if (! shouldAvoid) {
|
||||||
log("no longer avoiding link %s", pathToStr(_paths[i].p).c_str());
|
log("no longer avoiding link %s", pathToStr(_paths[i].p).c_str());
|
||||||
_paths[i].shouldAvoid = false;
|
_paths[i].shouldAvoid = false;
|
||||||
@ -1482,7 +1510,8 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
_lastBondStatusLog = now;
|
_lastBondStatusLog = now;
|
||||||
if (_abPathIdx == ZT_MAX_PEER_NETWORK_PATHS) {
|
if (_abPathIdx == ZT_MAX_PEER_NETWORK_PATHS) {
|
||||||
log("no active link");
|
log("no active link");
|
||||||
} else if (_paths[_abPathIdx].p) {
|
}
|
||||||
|
else if (_paths[_abPathIdx].p) {
|
||||||
log("active link is %s, failover queue size is %zu", pathToStr(_paths[_abPathIdx].p).c_str(), _abFailoverQueue.size());
|
log("active link is %s, failover queue size is %zu", pathToStr(_paths[_abPathIdx].p).c_str(), _abFailoverQueue.size());
|
||||||
}
|
}
|
||||||
if (_abFailoverQueue.empty()) {
|
if (_abFailoverQueue.empty()) {
|
||||||
@ -1590,7 +1619,8 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
log("link %s is ineligible, removing from failover queue (%zu links remain in queue)", pathToStr(_paths[_abPathIdx].p).c_str(), _abFailoverQueue.size());
|
log("link %s is ineligible, removing from failover queue (%zu links remain in queue)", pathToStr(_paths[_abPathIdx].p).c_str(), _abFailoverQueue.size());
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1656,7 +1686,7 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
if (! bFoundPathInQueue) {
|
if (! bFoundPathInQueue) {
|
||||||
_abFailoverQueue.push_front(i);
|
_abFailoverQueue.push_front(i);
|
||||||
log("add link %s to failover queue (%zu links in queue)", pathToStr(_paths[i].p).c_str(), _abFailoverQueue.size());
|
log("add link %s to failover queue (%zu links in queue)", pathToStr(_paths[i].p).c_str(), _abFailoverQueue.size());
|
||||||
addPathToBond(0, i);
|
addPathToBond(i, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1706,7 +1736,7 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
if (! bFoundPathInQueue) {
|
if (! bFoundPathInQueue) {
|
||||||
_abFailoverQueue.push_front(i);
|
_abFailoverQueue.push_front(i);
|
||||||
log("add link %s to failover queue (%zu links in queue)", pathToStr(_paths[i].p).c_str(), _abFailoverQueue.size());
|
log("add link %s to failover queue (%zu links in queue)", pathToStr(_paths[i].p).c_str(), _abFailoverQueue.size());
|
||||||
addPathToBond(0, i);
|
addPathToBond(i, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1739,7 +1769,8 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
if (! _abFailoverQueue.empty()) {
|
if (! _abFailoverQueue.empty()) {
|
||||||
dequeueNextActiveBackupPath(now);
|
dequeueNextActiveBackupPath(now);
|
||||||
log("active link switched to %s", pathToStr(_paths[_abPathIdx].p).c_str());
|
log("active link switched to %s", pathToStr(_paths[_abPathIdx].p).c_str());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
log("failover queue is empty, no links to choose from");
|
log("failover queue is empty, no links to choose from");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1785,7 +1816,8 @@ void Bond::processActiveBackupTasks(void* tPtr, int64_t now)
|
|||||||
dequeueNextActiveBackupPath(now);
|
dequeueNextActiveBackupPath(now);
|
||||||
_lastPathNegotiationCheck = now;
|
_lastPathNegotiationCheck = now;
|
||||||
log("switch negotiated link %s (select mode: optimize)", pathToStr(_paths[_abPathIdx].p).c_str());
|
log("switch negotiated link %s (select mode: optimize)", pathToStr(_paths[_abPathIdx].p).c_str());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Try to find a better path and automatically switch to it -- not too often, though.
|
// Try to find a better path and automatically switch to it -- not too often, though.
|
||||||
if ((now - _lastActiveBackupPathChange) > ZT_BOND_OPTIMIZE_INTERVAL) {
|
if ((now - _lastActiveBackupPathChange) > ZT_BOND_OPTIMIZE_INTERVAL) {
|
||||||
if (! _abFailoverQueue.empty()) {
|
if (! _abFailoverQueue.empty()) {
|
||||||
@ -1901,7 +1933,7 @@ void Bond::setBondParameters(int policy, SharedPtr<Bond> templateBond, bool useT
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! _isLeaf) {
|
if (! _isLeaf) {
|
||||||
_policy = ZT_BOND_POLICY_ACTIVE_BACKUP;
|
_policy = ZT_BOND_POLICY_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Timer geometry
|
// Timer geometry
|
||||||
|
@ -315,7 +315,6 @@ class Peer;
|
|||||||
|
|
||||||
class Bond {
|
class Bond {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop bond's internal functions (can be resumed)
|
* Stop bond's internal functions (can be resumed)
|
||||||
*/
|
*/
|
||||||
@ -909,7 +908,8 @@ class Bond {
|
|||||||
_lastAckRateCheck = now;
|
_lastAckRateCheck = now;
|
||||||
if (_ackCutoffCount > numToDrain) {
|
if (_ackCutoffCount > numToDrain) {
|
||||||
_ackCutoffCount -= numToDrain;
|
_ackCutoffCount -= numToDrain;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
_ackCutoffCount = 0;
|
_ackCutoffCount = 0;
|
||||||
}
|
}
|
||||||
return (_ackCutoffCount < ZT_ACK_CUTOFF_LIMIT);
|
return (_ackCutoffCount < ZT_ACK_CUTOFF_LIMIT);
|
||||||
@ -928,7 +928,8 @@ class Bond {
|
|||||||
uint64_t diff = now - _lastQoSRateCheck;
|
uint64_t diff = now - _lastQoSRateCheck;
|
||||||
if ((diff) <= (_qosSendInterval / ZT_MAX_PEER_NETWORK_PATHS)) {
|
if ((diff) <= (_qosSendInterval / ZT_MAX_PEER_NETWORK_PATHS)) {
|
||||||
++_qosCutoffCount;
|
++_qosCutoffCount;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
_qosCutoffCount = 0;
|
_qosCutoffCount = 0;
|
||||||
}
|
}
|
||||||
_lastQoSRateCheck = now;
|
_lastQoSRateCheck = now;
|
||||||
@ -948,7 +949,8 @@ class Bond {
|
|||||||
int diff = now - _lastPathNegotiationReceived;
|
int diff = now - _lastPathNegotiationReceived;
|
||||||
if ((diff) <= (ZT_PATH_NEGOTIATION_CUTOFF_TIME / ZT_MAX_PEER_NETWORK_PATHS)) {
|
if ((diff) <= (ZT_PATH_NEGOTIATION_CUTOFF_TIME / ZT_MAX_PEER_NETWORK_PATHS)) {
|
||||||
++_pathNegotiationCutoffCount;
|
++_pathNegotiationCutoffCount;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
_pathNegotiationCutoffCount = 0;
|
_pathNegotiationCutoffCount = 0;
|
||||||
}
|
}
|
||||||
_lastPathNegotiationReceived = now;
|
_lastPathNegotiationReceived = now;
|
||||||
@ -1230,6 +1232,7 @@ class Bond {
|
|||||||
, packetsReceivedSinceLastQoS(0)
|
, packetsReceivedSinceLastQoS(0)
|
||||||
, packetsIn(0)
|
, packetsIn(0)
|
||||||
, packetsOut(0)
|
, packetsOut(0)
|
||||||
|
, localPort(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1245,17 +1248,20 @@ class Bond {
|
|||||||
unsigned int suggestedRefractoryPeriod = refractoryPeriod ? punishment + (refractoryPeriod * 2) : punishment;
|
unsigned int suggestedRefractoryPeriod = refractoryPeriod ? punishment + (refractoryPeriod * 2) : punishment;
|
||||||
refractoryPeriod = std::min(suggestedRefractoryPeriod, (unsigned int)ZT_BOND_MAX_REFRACTORY_PERIOD);
|
refractoryPeriod = std::min(suggestedRefractoryPeriod, (unsigned int)ZT_BOND_MAX_REFRACTORY_PERIOD);
|
||||||
lastRefractoryUpdate = 0;
|
lastRefractoryUpdate = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
uint32_t drainRefractory = 0;
|
uint32_t drainRefractory = 0;
|
||||||
if (lastRefractoryUpdate) {
|
if (lastRefractoryUpdate) {
|
||||||
drainRefractory = (now - lastRefractoryUpdate);
|
drainRefractory = (now - lastRefractoryUpdate);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
drainRefractory = (now - lastAliveToggle);
|
drainRefractory = (now - lastAliveToggle);
|
||||||
}
|
}
|
||||||
lastRefractoryUpdate = now;
|
lastRefractoryUpdate = now;
|
||||||
if (refractoryPeriod > drainRefractory) {
|
if (refractoryPeriod > drainRefractory) {
|
||||||
refractoryPeriod -= drainRefractory;
|
refractoryPeriod -= drainRefractory;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
refractoryPeriod = 0;
|
refractoryPeriod = 0;
|
||||||
lastRefractoryUpdate = 0;
|
lastRefractoryUpdate = 0;
|
||||||
}
|
}
|
||||||
@ -1292,7 +1298,6 @@ class Bond {
|
|||||||
*/
|
*/
|
||||||
inline bool needsToSendQoS(int64_t now, uint64_t qosSendInterval)
|
inline bool needsToSendQoS(int64_t now, uint64_t qosSendInterval)
|
||||||
{
|
{
|
||||||
// fprintf(stderr, "QOS table (%d / %d)\n", packetsReceivedSinceLastQoS, ZT_QOS_TABLE_SIZE);
|
|
||||||
return ((packetsReceivedSinceLastQoS >= ZT_QOS_TABLE_SIZE) || ((now - lastQoSMeasurement) > qosSendInterval)) && packetsReceivedSinceLastQoS;
|
return ((packetsReceivedSinceLastQoS >= ZT_QOS_TABLE_SIZE) || ((now - lastQoSMeasurement) > qosSendInterval)) && packetsReceivedSinceLastQoS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1364,6 +1369,8 @@ class Bond {
|
|||||||
int packetsIn;
|
int packetsIn;
|
||||||
int packetsOut;
|
int packetsOut;
|
||||||
|
|
||||||
|
uint16_t localPort;
|
||||||
|
|
||||||
// AtomicCounter __refCount;
|
// AtomicCounter __refCount;
|
||||||
|
|
||||||
SharedPtr<Path> p;
|
SharedPtr<Path> p;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -399,6 +399,11 @@
|
|||||||
*/
|
*/
|
||||||
#define ZT_QOS_SHORTTERM_SAMPLE_WIN_SIZE 64
|
#define ZT_QOS_SHORTTERM_SAMPLE_WIN_SIZE 64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of samples required before statistics summaries are computed
|
||||||
|
*/
|
||||||
|
#define ZT_QOS_SHORTTERM_SAMPLE_WIN_MIN_REQ_SIZE 4
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Max allowable time spent in any queue (in ms)
|
* Max allowable time spent in any queue (in ms)
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -132,7 +132,20 @@ InetAddress::IpScope InetAddress::ipScope() const
|
|||||||
return IP_SCOPE_PRIVATE; // fc00::/7
|
return IP_SCOPE_PRIVATE; // fc00::/7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// :::ffff:127.0.0.1
|
||||||
|
// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0x7f, 0, 0, 1
|
||||||
unsigned int k = 0;
|
unsigned int k = 0;
|
||||||
|
while ((!ip[k])&&(k < 9)) {
|
||||||
|
++k;
|
||||||
|
}
|
||||||
|
if (k == 9) {
|
||||||
|
if (ip[10] == 0xff && ip[11] == 0xff && ip[12] == 0x7f) {
|
||||||
|
return IP_SCOPE_LOOPBACK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
k = 0;
|
||||||
while ((!ip[k])&&(k < 15)) {
|
while ((!ip[k])&&(k < 15)) {
|
||||||
++k;
|
++k;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
114
node/Network.cpp
114
node/Network.cpp
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -107,11 +107,22 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
// The default match state for each set of entries starts as 'true' since an
|
// The default match state for each set of entries starts as 'true' since an
|
||||||
// ACTION with no MATCH entries preceding it is always taken.
|
// ACTION with no MATCH entries preceding it is always taken.
|
||||||
uint8_t thisSetMatches = 1;
|
uint8_t thisSetMatches = 1;
|
||||||
|
uint8_t skipDrop = 0;
|
||||||
|
|
||||||
rrl.clear();
|
rrl.clear();
|
||||||
|
|
||||||
|
// uncomment for easier debugging fprintf
|
||||||
|
// if (!ztDest) { return DOZTFILTER_ACCEPT; }
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//char buf[40], buf2[40];
|
||||||
|
//fprintf(stderr, "\nsrc %s dest %s inbound: %d ethertype %u", ztSource.toString(buf), ztDest.toString(buf2), inbound, etherType);
|
||||||
|
#endif
|
||||||
|
|
||||||
for(unsigned int rn=0;rn<ruleCount;++rn) {
|
for(unsigned int rn=0;rn<ruleCount;++rn) {
|
||||||
const ZT_VirtualNetworkRuleType rt = (ZT_VirtualNetworkRuleType)(rules[rn].t & 0x3f);
|
const ZT_VirtualNetworkRuleType rt = (ZT_VirtualNetworkRuleType)(rules[rn].t & 0x3f);
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\n%02u %02d", rn, rt);
|
||||||
|
#endif
|
||||||
|
|
||||||
// First check if this is an ACTION
|
// First check if this is an ACTION
|
||||||
if ((unsigned int)rt <= (unsigned int)ZT_NETWORK_RULE_ACTION__MAX_ID) {
|
if ((unsigned int)rt <= (unsigned int)ZT_NETWORK_RULE_ACTION__MAX_ID) {
|
||||||
@ -121,11 +132,25 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
qosBucket = (rules[rn].v.qosBucket <= 8) ? rules[rn].v.qosBucket : 4; // 4 = default bucket (no priority)
|
qosBucket = (rules[rn].v.qosBucket <= 8) ? rules[rn].v.qosBucket : 4; // 4 = default bucket (no priority)
|
||||||
return DOZTFILTER_ACCEPT;
|
return DOZTFILTER_ACCEPT;
|
||||||
|
|
||||||
case ZT_NETWORK_RULE_ACTION_DROP:
|
case ZT_NETWORK_RULE_ACTION_DROP: {
|
||||||
|
if (!!skipDrop) {
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\tskip Drop");
|
||||||
|
#endif
|
||||||
|
skipDrop = 0; continue;
|
||||||
|
}
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\tDrop\n");
|
||||||
|
#endif
|
||||||
return DOZTFILTER_DROP;
|
return DOZTFILTER_DROP;
|
||||||
|
}
|
||||||
|
|
||||||
case ZT_NETWORK_RULE_ACTION_ACCEPT:
|
case ZT_NETWORK_RULE_ACTION_ACCEPT: {
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\tAccept\n");
|
||||||
|
#endif
|
||||||
return (superAccept ? DOZTFILTER_SUPER_ACCEPT : DOZTFILTER_ACCEPT); // match, accept packet
|
return (superAccept ? DOZTFILTER_SUPER_ACCEPT : DOZTFILTER_ACCEPT); // match, accept packet
|
||||||
|
}
|
||||||
|
|
||||||
// These are initially handled together since preliminary logic is common
|
// These are initially handled together since preliminary logic is common
|
||||||
case ZT_NETWORK_RULE_ACTION_TEE:
|
case ZT_NETWORK_RULE_ACTION_TEE:
|
||||||
@ -192,6 +217,9 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
// If this was not an ACTION evaluate next MATCH and update thisSetMatches with (AND [result])
|
// If this was not an ACTION evaluate next MATCH and update thisSetMatches with (AND [result])
|
||||||
uint8_t thisRuleMatches = 0;
|
uint8_t thisRuleMatches = 0;
|
||||||
uint64_t ownershipVerificationMask = 1; // this magic value means it hasn't been computed yet -- this is done lazily the first time it's needed
|
uint64_t ownershipVerificationMask = 1; // this magic value means it hasn't been computed yet -- this is done lazily the first time it's needed
|
||||||
|
uint8_t hardYes = (rules[rn].t >> 7) ^ 1; // XOR with the NOT bit of the rule
|
||||||
|
uint8_t hardNo = (rules[rn].t >> 7) ^ 0;
|
||||||
|
|
||||||
switch(rt) {
|
switch(rt) {
|
||||||
case ZT_NETWORK_RULE_MATCH_SOURCE_ZEROTIER_ADDRESS:
|
case ZT_NETWORK_RULE_MATCH_SOURCE_ZEROTIER_ADDRESS:
|
||||||
thisRuleMatches = (uint8_t)(rules[rn].v.zt == ztSource.toInt());
|
thisRuleMatches = (uint8_t)(rules[rn].v.zt == ztSource.toInt());
|
||||||
@ -220,28 +248,28 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
if ((etherType == ZT_ETHERTYPE_IPV4)&&(frameLen >= 20)) {
|
if ((etherType == ZT_ETHERTYPE_IPV4)&&(frameLen >= 20)) {
|
||||||
thisRuleMatches = (uint8_t)(InetAddress((const void *)&(rules[rn].v.ipv4.ip),4,rules[rn].v.ipv4.mask).containsAddress(InetAddress((const void *)(frameData + 12),4,0)));
|
thisRuleMatches = (uint8_t)(InetAddress((const void *)&(rules[rn].v.ipv4.ip),4,rules[rn].v.ipv4.mask).containsAddress(InetAddress((const void *)(frameData + 12),4,0)));
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IPV4_DEST:
|
case ZT_NETWORK_RULE_MATCH_IPV4_DEST:
|
||||||
if ((etherType == ZT_ETHERTYPE_IPV4)&&(frameLen >= 20)) {
|
if ((etherType == ZT_ETHERTYPE_IPV4)&&(frameLen >= 20)) {
|
||||||
thisRuleMatches = (uint8_t)(InetAddress((const void *)&(rules[rn].v.ipv4.ip),4,rules[rn].v.ipv4.mask).containsAddress(InetAddress((const void *)(frameData + 16),4,0)));
|
thisRuleMatches = (uint8_t)(InetAddress((const void *)&(rules[rn].v.ipv4.ip),4,rules[rn].v.ipv4.mask).containsAddress(InetAddress((const void *)(frameData + 16),4,0)));
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IPV6_SOURCE:
|
case ZT_NETWORK_RULE_MATCH_IPV6_SOURCE:
|
||||||
if ((etherType == ZT_ETHERTYPE_IPV6)&&(frameLen >= 40)) {
|
if ((etherType == ZT_ETHERTYPE_IPV6)&&(frameLen >= 40)) {
|
||||||
thisRuleMatches = (uint8_t)(InetAddress((const void *)rules[rn].v.ipv6.ip,16,rules[rn].v.ipv6.mask).containsAddress(InetAddress((const void *)(frameData + 8),16,0)));
|
thisRuleMatches = (uint8_t)(InetAddress((const void *)rules[rn].v.ipv6.ip,16,rules[rn].v.ipv6.mask).containsAddress(InetAddress((const void *)(frameData + 8),16,0)));
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IPV6_DEST:
|
case ZT_NETWORK_RULE_MATCH_IPV6_DEST:
|
||||||
if ((etherType == ZT_ETHERTYPE_IPV6)&&(frameLen >= 40)) {
|
if ((etherType == ZT_ETHERTYPE_IPV6)&&(frameLen >= 40)) {
|
||||||
thisRuleMatches = (uint8_t)(InetAddress((const void *)rules[rn].v.ipv6.ip,16,rules[rn].v.ipv6.mask).containsAddress(InetAddress((const void *)(frameData + 24),16,0)));
|
thisRuleMatches = (uint8_t)(InetAddress((const void *)rules[rn].v.ipv6.ip,16,rules[rn].v.ipv6.mask).containsAddress(InetAddress((const void *)(frameData + 24),16,0)));
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IP_TOS:
|
case ZT_NETWORK_RULE_MATCH_IP_TOS:
|
||||||
@ -252,7 +280,7 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
const uint8_t tosMasked = (((frameData[0] << 4) & 0xf0) | ((frameData[1] >> 4) & 0x0f)) & rules[rn].v.ipTos.mask;
|
const uint8_t tosMasked = (((frameData[0] << 4) & 0xf0) | ((frameData[1] >> 4) & 0x0f)) & rules[rn].v.ipTos.mask;
|
||||||
thisRuleMatches = (uint8_t)((tosMasked >= rules[rn].v.ipTos.value[0])&&(tosMasked <= rules[rn].v.ipTos.value[1]));
|
thisRuleMatches = (uint8_t)((tosMasked >= rules[rn].v.ipTos.value[0])&&(tosMasked <= rules[rn].v.ipTos.value[1]));
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IP_PROTOCOL:
|
case ZT_NETWORK_RULE_MATCH_IP_PROTOCOL:
|
||||||
@ -263,10 +291,10 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
if (_ipv6GetPayload(frameData,frameLen,pos,proto)) {
|
if (_ipv6GetPayload(frameData,frameLen,pos,proto)) {
|
||||||
thisRuleMatches = (uint8_t)(rules[rn].v.ipProtocol == (uint8_t)proto);
|
thisRuleMatches = (uint8_t)(rules[rn].v.ipProtocol == (uint8_t)proto);
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_ETHERTYPE:
|
case ZT_NETWORK_RULE_MATCH_ETHERTYPE:
|
||||||
@ -281,16 +309,16 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
if ((rules[rn].v.icmp.flags & 0x01) != 0) {
|
if ((rules[rn].v.icmp.flags & 0x01) != 0) {
|
||||||
thisRuleMatches = (uint8_t)(frameData[ihl+1] == rules[rn].v.icmp.code);
|
thisRuleMatches = (uint8_t)(frameData[ihl+1] == rules[rn].v.icmp.code);
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 1;
|
thisRuleMatches = hardYes;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else if (etherType == ZT_ETHERTYPE_IPV6) {
|
} else if (etherType == ZT_ETHERTYPE_IPV6) {
|
||||||
unsigned int pos = 0,proto = 0;
|
unsigned int pos = 0,proto = 0;
|
||||||
@ -300,19 +328,19 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
if ((rules[rn].v.icmp.flags & 0x01) != 0) {
|
if ((rules[rn].v.icmp.flags & 0x01) != 0) {
|
||||||
thisRuleMatches = (uint8_t)(frameData[pos+1] == rules[rn].v.icmp.code);
|
thisRuleMatches = (uint8_t)(frameData[pos+1] == rules[rn].v.icmp.code);
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 1;
|
thisRuleMatches = hardYes;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_IP_SOURCE_PORT_RANGE:
|
case ZT_NETWORK_RULE_MATCH_IP_SOURCE_PORT_RANGE:
|
||||||
@ -356,10 +384,10 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
}
|
}
|
||||||
thisRuleMatches = (p > 0) ? (uint8_t)((p >= (int)rules[rn].v.port[0])&&(p <= (int)rules[rn].v.port[1])) : (uint8_t)0;
|
thisRuleMatches = (p > 0) ? (uint8_t)((p >= (int)rules[rn].v.port[0])&&(p <= (int)rules[rn].v.port[1])) : (uint8_t)0;
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZT_NETWORK_RULE_MATCH_CHARACTERISTICS: {
|
case ZT_NETWORK_RULE_MATCH_CHARACTERISTICS: {
|
||||||
@ -444,6 +472,14 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
const Tag *const localTag = std::lower_bound(&(nconf.tags[0]),&(nconf.tags[nconf.tagCount]),rules[rn].v.tag.id,Tag::IdComparePredicate());
|
const Tag *const localTag = std::lower_bound(&(nconf.tags[0]),&(nconf.tags[nconf.tagCount]),rules[rn].v.tag.id,Tag::IdComparePredicate());
|
||||||
if ((localTag != &(nconf.tags[nconf.tagCount]))&&(localTag->id() == rules[rn].v.tag.id)) {
|
if ((localTag != &(nconf.tags[nconf.tagCount]))&&(localTag->id() == rules[rn].v.tag.id)) {
|
||||||
const Tag *const remoteTag = ((membership) ? membership->getTag(nconf,rules[rn].v.tag.id) : (const Tag *)0);
|
const Tag *const remoteTag = ((membership) ? membership->getTag(nconf,rules[rn].v.tag.id) : (const Tag *)0);
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
/*fprintf(stderr, "\tlocal tag [%u: %u] remote tag [%u: %u] match [%u]",
|
||||||
|
!!localTag ? localTag->id() : 0,
|
||||||
|
!!localTag ? localTag->value() : 0,
|
||||||
|
!!remoteTag ? remoteTag->id() : 0,
|
||||||
|
!!remoteTag ? remoteTag->value() : 0,
|
||||||
|
thisRuleMatches);*/
|
||||||
|
#endif
|
||||||
if (remoteTag) {
|
if (remoteTag) {
|
||||||
const uint32_t ltv = localTag->value();
|
const uint32_t ltv = localTag->value();
|
||||||
const uint32_t rtv = remoteTag->value();
|
const uint32_t rtv = remoteTag->value();
|
||||||
@ -459,28 +495,46 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
} else if (rt == ZT_NETWORK_RULE_MATCH_TAGS_EQUAL) {
|
} else if (rt == ZT_NETWORK_RULE_MATCH_TAGS_EQUAL) {
|
||||||
thisRuleMatches = (uint8_t)((ltv == rules[rn].v.tag.value)&&(rtv == rules[rn].v.tag.value));
|
thisRuleMatches = (uint8_t)((ltv == rules[rn].v.tag.value)&&(rtv == rules[rn].v.tag.value));
|
||||||
} else { // sanity check, can't really happen
|
} else { // sanity check, can't really happen
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((inbound)&&(!superAccept)) {
|
if ((inbound)&&(!superAccept)) {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\tinbound ");
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// Outbound side is not strict since if we have to match both tags and
|
// Outbound side is not strict since if we have to match both tags and
|
||||||
// we are sending a first packet to a recipient, we probably do not know
|
// we are sending a first packet to a recipient, we probably do not know
|
||||||
// about their tags yet. They will filter on inbound and we will filter
|
// about their tags yet. They will filter on inbound and we will filter
|
||||||
// once we get their tag. If we are a tee/redirect target we are also
|
// once we get their tag. If we are a tee/redirect target we are also
|
||||||
// not strict since we likely do not have these tags.
|
// not strict since we likely do not have these tags.
|
||||||
thisRuleMatches = 1;
|
skipDrop = 1;
|
||||||
|
thisRuleMatches = hardYes;
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
//fprintf(stderr, "\toutbound ");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case ZT_NETWORK_RULE_MATCH_TAG_SENDER:
|
case ZT_NETWORK_RULE_MATCH_TAG_SENDER:
|
||||||
case ZT_NETWORK_RULE_MATCH_TAG_RECEIVER: {
|
case ZT_NETWORK_RULE_MATCH_TAG_RECEIVER: {
|
||||||
|
const Tag *const localTag = std::lower_bound(&(nconf.tags[0]),&(nconf.tags[nconf.tagCount]),rules[rn].v.tag.id,Tag::IdComparePredicate());
|
||||||
|
#ifdef ZT_TRACE
|
||||||
|
/*const Tag *const remoteTag = ((membership) ? membership->getTag(nconf,rules[rn].v.tag.id) : (const Tag *)0);
|
||||||
|
fprintf(stderr, "\tlocal tag [%u: %u] remote tag [%u: %u] match [%u]",
|
||||||
|
!!localTag ? localTag->id() : 0,
|
||||||
|
!!localTag ? localTag->value() : 0,
|
||||||
|
!!remoteTag ? remoteTag->id() : 0,
|
||||||
|
!!remoteTag ? remoteTag->value() : 0,
|
||||||
|
thisRuleMatches);*/
|
||||||
|
#endif
|
||||||
if (superAccept) {
|
if (superAccept) {
|
||||||
thisRuleMatches = 1;
|
skipDrop = 1;
|
||||||
|
thisRuleMatches = hardYes;
|
||||||
} else if ( ((rt == ZT_NETWORK_RULE_MATCH_TAG_SENDER)&&(inbound)) || ((rt == ZT_NETWORK_RULE_MATCH_TAG_RECEIVER)&&(!inbound)) ) {
|
} else if ( ((rt == ZT_NETWORK_RULE_MATCH_TAG_SENDER)&&(inbound)) || ((rt == ZT_NETWORK_RULE_MATCH_TAG_RECEIVER)&&(!inbound)) ) {
|
||||||
const Tag *const remoteTag = ((membership) ? membership->getTag(nconf,rules[rn].v.tag.id) : (const Tag *)0);
|
const Tag *const remoteTag = ((membership) ? membership->getTag(nconf,rules[rn].v.tag.id) : (const Tag *)0);
|
||||||
if (remoteTag) {
|
if (remoteTag) {
|
||||||
@ -489,17 +543,17 @@ static _doZtFilterResult _doZtFilter(
|
|||||||
if (rt == ZT_NETWORK_RULE_MATCH_TAG_RECEIVER) {
|
if (rt == ZT_NETWORK_RULE_MATCH_TAG_RECEIVER) {
|
||||||
// If we are checking the receiver and this is an outbound packet, we
|
// If we are checking the receiver and this is an outbound packet, we
|
||||||
// can't be strict since we may not yet know the receiver's tag.
|
// can't be strict since we may not yet know the receiver's tag.
|
||||||
thisRuleMatches = 1;
|
skipDrop = 1;
|
||||||
|
thisRuleMatches = hardYes;
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // sender and outbound or receiver and inbound
|
} else { // sender and outbound or receiver and inbound
|
||||||
const Tag *const localTag = std::lower_bound(&(nconf.tags[0]),&(nconf.tags[nconf.tagCount]),rules[rn].v.tag.id,Tag::IdComparePredicate());
|
|
||||||
if ((localTag != &(nconf.tags[nconf.tagCount]))&&(localTag->id() == rules[rn].v.tag.id)) {
|
if ((localTag != &(nconf.tags[nconf.tagCount]))&&(localTag->id() == rules[rn].v.tag.id)) {
|
||||||
thisRuleMatches = (uint8_t)(localTag->value() == rules[rn].v.tag.value);
|
thisRuleMatches = (uint8_t)(localTag->value() == rules[rn].v.tag.value);
|
||||||
} else {
|
} else {
|
||||||
thisRuleMatches = 0;
|
thisRuleMatches = hardNo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -578,6 +578,7 @@ ZT_PeerList *Node::peers() const
|
|||||||
if((*path)->valid()) {
|
if((*path)->valid()) {
|
||||||
memcpy(&(p->paths[p->pathCount].address),&((*path)->address()),sizeof(struct sockaddr_storage));
|
memcpy(&(p->paths[p->pathCount].address),&((*path)->address()),sizeof(struct sockaddr_storage));
|
||||||
p->paths[p->pathCount].localSocket = (*path)->localSocket();
|
p->paths[p->pathCount].localSocket = (*path)->localSocket();
|
||||||
|
p->paths[p->pathCount].localPort = (*path)->localPort();
|
||||||
p->paths[p->pathCount].lastSend = (*path)->lastOut();
|
p->paths[p->pathCount].lastSend = (*path)->lastOut();
|
||||||
p->paths[p->pathCount].lastReceive = (*path)->lastIn();
|
p->paths[p->pathCount].lastReceive = (*path)->lastIn();
|
||||||
p->paths[p->pathCount].trustedPathId = RR->topology->getOutboundPathTrust((*path)->address());
|
p->paths[p->pathCount].trustedPathId = RR->topology->getOutboundPathTrust((*path)->address());
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
@ -84,6 +84,7 @@ public:
|
|||||||
_lastIn(0),
|
_lastIn(0),
|
||||||
_lastTrustEstablishedPacketReceived(0),
|
_lastTrustEstablishedPacketReceived(0),
|
||||||
_lastEchoRequestReceived(0),
|
_lastEchoRequestReceived(0),
|
||||||
|
_localPort(0),
|
||||||
_localSocket(-1),
|
_localSocket(-1),
|
||||||
_latencyMean(0.0),
|
_latencyMean(0.0),
|
||||||
_latencyVariance(0.0),
|
_latencyVariance(0.0),
|
||||||
@ -106,6 +107,7 @@ public:
|
|||||||
_lastIn(0),
|
_lastIn(0),
|
||||||
_lastTrustEstablishedPacketReceived(0),
|
_lastTrustEstablishedPacketReceived(0),
|
||||||
_lastEchoRequestReceived(0),
|
_lastEchoRequestReceived(0),
|
||||||
|
_localPort(0),
|
||||||
_localSocket(localSocket),
|
_localSocket(localSocket),
|
||||||
_latencyMean(0.0),
|
_latencyMean(0.0),
|
||||||
_latencyVariance(0.0),
|
_latencyVariance(0.0),
|
||||||
@ -177,6 +179,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline int64_t localSocket() const { return _localSocket; }
|
inline int64_t localSocket() const { return _localSocket; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Local port corresponding to the localSocket
|
||||||
|
*/
|
||||||
|
inline int64_t localPort() const { return _localPort; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Physical address
|
* @return Physical address
|
||||||
*/
|
*/
|
||||||
@ -375,6 +382,7 @@ private:
|
|||||||
|
|
||||||
int64_t _lastEchoRequestReceived;
|
int64_t _lastEchoRequestReceived;
|
||||||
|
|
||||||
|
uint16_t _localPort;
|
||||||
int64_t _localSocket;
|
int64_t _localSocket;
|
||||||
|
|
||||||
volatile float _latencyMean;
|
volatile float _latencyMean;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Use of this software is governed by the Business Source License included
|
* Use of this software is governed by the Business Source License included
|
||||||
* in the LICENSE.TXT file in the project's root directory.
|
* in the LICENSE.TXT file in the project's root directory.
|
||||||
*
|
*
|
||||||
* Change Date: 2025-01-01
|
* Change Date: 2026-01-01
|
||||||
*
|
*
|
||||||
* On the date above, in accordance with the Business Source License, use
|
* On the date above, in accordance with the Business Source License, use
|
||||||
* of this software will be governed by version 2.0 of the Apache License.
|
* of this software will be governed by version 2.0 of the Apache License.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user