Commit graph

515 commits

Author SHA1 Message Date
Grant Limberg
0f3a5148b1 fix deps for selftest 2025-09-03 09:29:33 -07:00
Grant Limberg
195d5b47f0 Merge branch 'adam/1.16' into gl/ctl-pubsub
Some checks are pending
/ build_macos (push) Waiting to run
/ build_windows (push) Waiting to run
/ build_ubuntu (push) Waiting to run
2025-09-01 16:47:55 -07:00
Grant Limberg
7f3b15011e Update central controller build to use CMake + conda
Muuuuch easier to use external dependencies now

Also tried out conan and vcpkg.   Ran into dependency issues when solving for packages to install with conan.

vcpkg is just obtuse as all hell to install and not easy to integrate
2025-08-27 16:23:02 -07:00
Adam Ierymenko
3e21edb891
Remove a bunch of warnings by eliminating deprecated functions. 2025-08-21 10:06:56 -04:00
Adam Ierymenko
2f2f864aa8
Clear ifname buffer before copying into it. 2025-08-20 17:23:18 -04:00
Adam Ierymenko
3cd413ed1f
Revert "Remove moons, phase I, and also fix usages of sprintf. These were safe but the function itself is considered unsafe and deprecated."
This reverts commit 8518d28dc4.
2025-08-08 14:59:22 -04:00
Adam Ierymenko
8518d28dc4
Remove moons, phase I, and also fix usages of sprintf. These were safe but the function itself is considered unsafe and deprecated.
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
2025-08-08 13:43:40 -04:00
Adam Ierymenko
f6d52dd96c
Rest -> MPL except controller.
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
2025-08-06 12:16:44 -04:00
Adam Ierymenko
3eb7ed2892
Move controller/ into nonfree/controller and update references 2025-07-30 14:18:36 -04:00
Adam Ierymenko
69de477d0b
Merge branch 'dev' into dev-extosdep
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
# Conflicts:
#	controller/DB.hpp
#	controller/DBMirrorSet.cpp
#	controller/DBMirrorSet.hpp
#	controller/EmbeddedNetworkController.cpp
#	controller/FileDB.cpp
#	controller/FileDB.hpp
#	controller/LFDB.cpp
#	controller/LFDB.hpp
#	controller/PostgreSQL.cpp
#	controller/PostgreSQL.hpp
#	node/Metrics.cpp
#	node/Metrics.hpp
#	osdep/EthernetTap.cpp
#	osdep/Http.hpp
#	osdep/ManagedRoute.cpp
#	service/OneService.cpp
2025-07-03 14:14:04 -04:00
Adam Ierymenko
5eb3cd2699
clang-format this branch to match dev 2025-07-03 14:10:44 -04:00
Grant Limberg
d72b98b434
does this make windows happy? 2025-07-03 08:48:39 -07:00
Adam Ierymenko
ba2a4a605c
clang-format 2025-07-03 11:26:23 -04:00
Joseph Henry
17abb58651
Add missing include to ExtOsDep.hpp 2025-03-04 10:26:31 -08:00
Joseph Henry
269c8d415a
Style match 2025-02-26 11:16:03 -08:00
Joseph Henry
cd191778c2
Add custom management plane for 3rd party vendors 2025-02-26 10:27:23 -08:00
Joseph Henry
82c6454950
Fix broken ifdef on OpenBSD 2024-11-13 09:01:09 -08:00
Joseph Henry
969c0ee6e3
Omit CPU pinning code on OpenBSD 2024-11-12 14:40:24 -08:00
Joseph Henry
75a5b4438b
Build fix for OpenBSD - See ticket #2397 2024-11-12 05:59:49 -08:00
Joseph Henry
d34481d830
Fix build error for BSD tap driver 2024-09-17 11:04:01 -07:00
Joseph Henry
95983ba168
Build fix for FreeBSD 2024-08-26 12:54:36 -07:00
Joseph Henry
b813ea70a5
Simplify packet critical path. Plus more platform fixes 2024-08-22 12:59:06 -07:00
Joseph Henry
e734019216
More platform-related build fixes 2024-08-21 14:06:25 -07:00
Joseph Henry
b7d9290de9
Fix build issue on macOS 2024-08-21 11:22:07 -07:00
Joseph Henry
8283a6d6d4 Merge branch 'dev' into jh-zerotier-multithreaded 2024-08-18 15:08:42 -07:00
Joseph Henry
36adae3d82
Add packet multiplexer 2024-08-18 15:07:18 -07:00
Joseph Henry
64634c916c
Fix build for macOS, tune to prevent packet re-ordering 2024-07-03 08:49:07 -07:00
Adam Ierymenko
1982071d46 1.14.0 version bump for Linux and macOS, date update. 2024-03-19 14:38:48 -07:00
Joseph Henry
2e6cda38f6
Port multipath improvements to newer version 2024-03-01 15:43:28 -08:00
Joseph Henry
683d332abc
Add multi-core concurrent packet processing 2024-02-23 09:57:39 -08:00
travisladuke
557b92a167 More reliable full tunnel on macOs
This makes switching between physical networks
with full tunnel mode enabled more reliable.
There were issues with the physical default route or device
changing.
2023-09-08 12:19:08 -07:00
Joseph Henry
7637ef10d7
Fix primary port binding issue in 1.12 (#2107)
* Add test for primary port bindings to validator - See #2105

* Add delay to binding test

* Remove TCP binding logic from Binder to fix #2105

* add second control plane socket for ipv6

* fix controller network post endpoint

* exit if we can't bind at least one of IPV4 or IPV6 for control plane port

---------

Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
2023-08-25 12:51:33 -04:00
Adam Ierymenko
ed0a388bcd
Windows arm64 (#2099)
* ARM64 changes for 1.12

* 1.12 Windows advanced installer updates and updates for ARM64
2023-08-17 12:48:48 -04:00
travisladuke
1d095e81d9 fix macos default route again
see commit fb6af1971 * Fix network DNS on macOS
adding that stuff to System Config causes this extra route to be added
which breaks ipv4 default route.
We figured out a weird System Coniguration setting
that works.

--- old
couldn't figure out how to fix it in SystemConfiguration
so here we are# Please enter the commit message for your changes. Lines starting

We also moved the dns setter to before the syncIps stuff
to help with a race condition. It didn't always work when
you re-joined a network with default route enabled.
2023-08-14 17:06:05 -07:00
travisladuke
d976a9f5a0 Comment out PortMapper debug
this got left turned on in a confusing merge previously
2023-08-14 17:06:05 -07:00
travisladuke
f2060e0c76 testing 2023-08-11 11:26:21 -07:00
travisladuke
b81ad9a84d Fix PortMapper issue on ZeroTier startup
See issue #2082

We use a call to libnatpmp::ininatpp to make sure the computer
has working network sockets before we go into the main
nat-pmp/upnp logic.

With basic exponenetial delay up to 30 seconds.
2023-08-11 11:26:21 -07:00
Brenton Bostick
e36127283c
Fix typos (#2075) 2023-08-01 08:53:55 -07:00
travisladuke
5b5ef07350 Add search domain to macos dns configuration
Stumbled upon this while debugging something else.
If we add search domain to our system configuration for
network DNS, then search domains work:

```
ping server1                                                                                                                                                                                    ~
PING server1.my.domain (10.123.3.1): 56 data bytes
64 bytes from 10.123.3.1
```
2023-07-31 12:37:59 -07:00
travisladuke
fb6af1971b Fix network DNS on macOS
It stopped working for ipv4 only networks in Monterey.
See #1696

We add some config like so to System Configuration

```
scutil
show State:/Network/Service/9bee8941b5xxxxxx/IPv4
<dictionary> {
  Addresses : <array> {
    0 : 10.2.1.36
  }
  InterfaceName : feth4823
  Router : 10.2.1.36
  ServerAddress : 127.0.0.1
}

```
2023-07-27 14:26:36 -07:00
travis laduke
22ab673480 Apply default route a different way - macOS
The original way we applied default route, by forking
0.0.0.0/0 into 0/1 and 128/1 works, but if mac os has any networking
hiccups -if you change SSIDs or sleep/wake- macos erases the system default route.
And then all networking on the computer is broken.

to summarize the new way:
allowDefault=1
```
sudo route delete default 192.168.82.1
sudo route add default 10.2.0.2
sudo route add -ifscope en1 default 192.168.82.1
```

gives us this routing table
```
Destination        Gateway            RT_IFA             Flags        Refs      Use    Mtu          Netif Expire    rtt(ms) rttvar(ms)
default            10.2.0.2           10.2.0.18          UGScg          90        1   2800       feth4823
default            192.168.82.1       192.168.82.217     UGScIg
```

allowDefault=0
```
sudo route delete default
sudo route delete -ifscope en1 default
sudo route add default 192.168.82.1
```

Notice the I flag, for -ifscope, on the physical default route.

route change does not seem to work reliably.
2023-07-20 13:37:05 -07:00
Adam Ierymenko
f1019dc4ee
Implement recvmmsg() for Linux to reduce syscalls. (#2046)
Between 5% and 40% speed improvement on Linux, depending on system configuration and load.
2023-07-20 11:36:37 -04:00
travisladuke
50ede37a58 remove ZT_NO_METRIC ifdef 2023-07-19 13:42:49 -07:00
Jörg Thalheim
19f1f02d91 tcp-proxy: fix build 2023-07-19 13:42:49 -07:00
Joseph Henry
97492eec7c
Fix ifdef that breaks libzt on iOS (#2050) 2023-07-17 16:49:58 -07:00
Joseph Henry
fdc2e0f692 Release memory previously allocated by UPNP_GetValidIGD 2023-07-13 16:34:14 -07:00
Travis LaDuke
6540107ccb
fix memory leak in macos ipv6/dns helper (#2030)
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-07-06 12:32:10 -07:00
Grant Limberg
30799dd73f
Merge pull request #2017 from zerotier/outbound-bytes-fix 2023-05-31 13:25:52 -07:00
Grant Limberg
8ebe2c563a
Fix udp sent metric
was only incrementing by 1 for each packet sent
2023-05-31 13:25:30 -07:00
travis laduke
e11d70e408 cache getifaddrs - windows 2023-05-25 11:21:35 -07:00