Commit Graph

6170 Commits

Author SHA1 Message Date
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
ffb63f3ee5
1.12.0 release notes (#2103)
* 1.12.0

* Linux build fixes for old distros.

* release notes
2023-08-23 13:07:38 -04:00
Adam Ierymenko
0859a0d1e5
1.12.0 (#2102)
* 1.12.0

* Linux build fixes for old distros.
2023-08-23 13:03:57 -04:00
travisladuke
e41a6f2ec4 update readme 2023-08-22 09:29:03 -07:00
Joseph Henry
c53c6bd9c3
Merge pull request #2100 from zerotier/brenton/fix-rx-in-tx
Fix problem of doing RX while inside of TX
2023-08-21 13:09:49 -07:00
Brenton Bostick
707d7deed2 Fix problem of doing RX while inside of TX
Part of fix for:
https://github.com/zerotier/libzt/issues/211
2023-08-21 15:04:48 -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
Brenton Bostick
826a1ee346 ANDROID-96: Simplify and use return code from node_init directly 2023-08-16 09:18:06 -04:00
Brenton Bostick
d4e63fcdfe Check if null is passed to VirtualNetworkConfig.equals and name fixes 2023-08-16 09:18:06 -04:00
Brenton Bostick
0806b881ea Basic cleanups 2023-08-16 09:18:06 -04:00
Joseph Henry
ead68038a3
Merge pull request #2096 from zerotier/dev-multipath-improvements
Add setmtu command, fix bond lifetime issue
2023-08-15 13:24:08 -07:00
Joseph Henry
b8b5d0bff8
Add setmtu command, fix bond lifetime issue 2023-08-15 12:59:58 -07:00
Joseph Henry
e18172d434
Merge pull request #2095 from zerotier/dev-minor-oneservice-fixes
Catch all conditions in switch statement, remove trailing whitespaces
2023-08-15 08:58:43 -07:00
Joseph Henry
a15883d49b
Catch all conditions in switch statement, remove trailing whitespaces 2023-08-15 08:54:05 -07: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
Joseph Henry
53bc05fe89
Merge pull request #2093 from zerotier/dev-validator-fix-dump-at-abort
Export variables so that they are accessible by exit function
2023-08-11 10:37:16 -07:00
Joseph Henry
a6d5c452d5
Export variables so that they are accessible by exit function 2023-08-11 10:35:42 -07:00
Joseph Henry
515fdc22a5
Merge pull request #2092 from zerotier/dev-validator-fix-dump-at-abort
Fix node time-to-online counter in validator script
2023-08-11 10:15:28 -07:00
Joseph Henry
424e276150
Fix node time-to-online counter in validator script 2023-08-11 10:14:29 -07:00
travisladuke
b071d6bbec Don't apply default route until zerotier is "online"
I was running into issues with restarting the zerotier service while
"full tunnel" mode is enabled.
When zerotier first boots, it gets network state from the cache
on disk. So it immediately applies all the routes it knew about
before it shutdown.
The network config may have change in this time.
If it has, then your default route is via a route
you are blocked from talking on. So you  can't get the current
network config, so your internet does not work.

Other options include
- don't use cached network state on boot
- find a better criteria than "online"
2023-08-11 10:13:34 -07:00
Joseph Henry
27a9cc6254
Merge pull request #2091 from zerotier/dev-validator-fix-dump-at-abort
Separate test and summary step in validator script
2023-08-10 15:38:27 -07:00
Joseph Henry
bb9ad5e41a
Separate test and summary step in validator script 2023-08-10 15:37:45 -07:00
Joseph Henry
d91f80464d
Merge pull request #2090 from zerotier/dev-validator-fix-dump-at-abort
Save zt node log files on abort
2023-08-10 11:08:52 -07:00
Joseph Henry
d826ddb294
Save zt node log files on abort 2023-08-10 11:02:37 -07:00
Joseph Henry
a7600c8072
Merge pull request #2089 from zerotier/dev-validator-fix-dump-at-abort
Save ZT dump files on validator abort
2023-08-10 10:55:41 -07:00
Joseph Henry
82a9122fc3
Update validate-1m-linux.sh 2023-08-10 09:58:47 -07:00
Joseph Henry
0e9e7f2ebc
Merge pull request #2086 from zerotier/tl-2082
Don't skip hellos when there are no paths available
2023-08-09 11:49:42 -07:00
travisladuke
14671009f8 Don't skip hellos when there are no paths available
working on #2082
2023-08-09 09:35:12 -07:00
travisladuke
0bc10923a1 Test that starting zerotier before internet works 2023-08-07 13:25:15 -07:00
Kenny MacDermid
c6f07ee19f
Disable executable stacks on assembly objects (#2071)
Add `--noexecstack` to the assembler flags so the resulting binary
will link with a non-executable stack.

Fixes zerotier/ZeroTierOne#1179

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
2023-08-02 15:12:49 -07:00
Brenton Bostick
e36127283c
Fix typos (#2075) 2023-08-01 08:53:55 -07:00
Joseph Henry
230ae6bd16 Fix reporting of secondaryPort and tertiaryPort See: #2039 2023-07-31 20:44:16 -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
lison
41f9bdc5db
Update build.sh (#2068)
fix mkwork compilation errors
2023-07-27 12:43:31 -04:00
Grant Limberg
12e64aa191
fix docker tag for controllers (#2066) 2023-07-20 16:22:03 -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
Brenton Bostick
03841dcb81
fix warning: 'OS_STRING' macro redefined [-Wmacro-redefined] (#2064)
Even though this is in ext, these particular chunks of code were added
by us, so are ok to modify.
2023-07-20 11:38:08 -04:00
Brenton Bostick
64c2634b71
suppress warnings: comparison of integers of different signs: 'int64_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Wsign-compare] (#2063) 2023-07-20 11:37:50 -04: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
travisladuke
60ddca1354 Adjust tcp-proxy makefile to support metrics
There's no way to get the metrics yet. Someone will
have to add the http service.
2023-07-19 13:42:49 -07:00
Jörg Thalheim
19f1f02d91 tcp-proxy: fix build 2023-07-19 13:42:49 -07:00
Grant Limberg
5a36b315a3
Exit if loading an invalid identity from disk (#2058)
* Exit if loading an invalid identity from disk

Previously, if an invalid identity was loaded from disk, ZeroTier would
generate a new identity & chug along and generate a brand new identity
as if nothing happened.  When running in containers, this introduces the
possibility for key matter loss; especially when running in containers
where the identity files are mounted in the container read only.  In
this case, ZT will continue chugging along with a brand new identity
with no possibility of recovering the private key.

ZeroTier should exit upon loading of invalid identity.public/identity.secret #2056

* add validation test for #2056
2023-07-18 14:10:31 -04:00
Sean OMeara
b67cd2cf7a
less drone (#2060) 2023-07-18 10:57:38 +02: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