Commit Graph

52 Commits

Author SHA1 Message Date
Adam Ierymenko
1982071d46 1.14.0 version bump for Linux and macOS, date update. 2024-03-19 14:38:48 -07: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
travis laduke
e11d70e408 cache getifaddrs - windows 2023-05-25 11:21:35 -07:00
Adam Ierymenko
1c5897895b
1.10.4 merge into main (#1893)
* add note about forceTcpRelay

* Create a sample systemd unit for tcp proxy

* set gitattributes for rust & cargo so hashes dont conflict on Windows

* Revert "set gitattributes for rust & cargo so hashes dont conflict on Windows"

This reverts commit 032dc5c108.

* Turn off autocrlf for rust source

Doesn't appear to play nice well when it comes to git and vendored cargo package hashes

* Fix #1883 (#1886)

Still unknown as to why, but the call to `nc->GetProperties()` can fail
when setting a friendly name on the Windows virtual ethernet adapter.
Ensure that `ncp` is not null before continuing and accessing the device
GUID.

* Don't vendor packages for zeroidc (#1885)

* Added docker environment way to join networks (#1871)

* add StringUtils

* fix headers
use recommended headers and remove unused headers

* move extern "C"
only JNI functions need to be exported

* cleanup

* fix ANDROID-50: RESULT_ERROR_BAD_PARAMETER typo

* fix typo in log message

* fix typos in JNI method signatures

* fix typo

* fix ANDROID-51: fieldName is uninitialized

* fix ANDROID-35: memory leak

* fix missing DeleteLocalRef in loops

* update to use unique error codes

* add GETENV macro

* add LOG_TAG defines

* ANDROID-48: add ZT_jnicache.cpp

* ANDROID-48: use ZT_jnicache.cpp and remove ZT_jnilookup.cpp and ZT_jniarray.cpp

* add Event.fromInt

* add PeerRole.fromInt

* add ResultCode.fromInt

* fix ANDROID-36: issues with ResultCode

* add VirtualNetworkConfigOperation.fromInt

* fix ANDROID-40: VirtualNetworkConfigOperation out-of-sync with ZT_VirtualNetworkConfigOperation enum

* add VirtualNetworkStatus.fromInt

* fix ANDROID-37: VirtualNetworkStatus out-of-sync with ZT_VirtualNetworkStatus enum

* add VirtualNetworkType.fromInt

* make NodeStatus a plain data class

* fix ANDROID-52: synchronization bug with nodeMap

* Node init work: separate Node construction and init

* add Node.toString

* make PeerPhysicalPath a plain data class

* remove unused PeerPhysicalPath.fixed

* add array functions

* make Peer a plain data class

* make Version a plain data class

* fix ANDROID-42: copy/paste error

* fix ANDROID-49: VirtualNetworkConfig.equals is wrong

* reimplement VirtualNetworkConfig.equals

* reimplement VirtualNetworkConfig.compareTo

* add VirtualNetworkConfig.hashCode

* make VirtualNetworkConfig a plain data class

* remove unused VirtualNetworkConfig.enabled

* reimplement VirtualNetworkDNS.equals

* add VirtualNetworkDNS.hashCode

* make VirtualNetworkDNS a plain data class

* reimplement VirtualNetworkRoute.equals

* reimplement VirtualNetworkRoute.compareTo

* reimplement VirtualNetworkRoute.toString

* add VirtualNetworkRoute.hashCode

* make VirtualNetworkRoute a plain data class

* add isSocketAddressEmpty

* add addressPort

* add fromSocketAddressObject

* invert logic in a couple of places and return early

* newInetAddress and newInetSocketAddress work
allow newInetSocketAddress to return NULL if given empty address

* fix ANDROID-38: stack corruption in onSendPacketRequested

* use GETENV macro

* JniRef work
JniRef does not use callbacks struct, so remove
fix NewGlobalRef / DeleteGlobalRef mismatch

* use PRId64 macros

* switch statement work

* comments and logging

* Modifier 'public' is redundant for interface members

* NodeException can be made a checked Exception

* 'NodeException' does not define a 'serialVersionUID' field

* 'finalize()' should not be overridden
this is fine to do because ZeroTierOneService calls close() when it is done

* error handling, error reporting, asserts, logging

* simplify loadLibrary

* rename Node.networks -> Node.networkConfigs

* Windows file permissions fix (#1887)

* Allow macOS interfaces to use multiple IP addresses (#1879)

Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Fix condition where full HELLOs might not be sent when necessary (#1877)

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* 1.10.4 version bumps

* Add security policy to repo (#1889)

* [+] add e2k64 arch (#1890)

* temp fix for ANDROID-56: crash inside newNetworkConfig from too many args

* 1.10.4 release notes

---------

Co-authored-by: travis laduke <travisladuke@gmail.com>
Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Joseph Henry <joseph-henry@users.noreply.github.com>
Co-authored-by: Roman Peshkichev <roman.peshkichev@gmail.com>
2023-03-07 16:50:34 -05:00
staphen
1c956494a4
Use lowercase when including Windows headers 2021-12-29 16:29:08 -05:00
Adam Ierymenko
79e2fd4586 Automatically detect Ethernet tap friendly name in Windows shouldBind stuff. 2021-03-16 10:12:55 -04:00
Grant Limberg
5188c7d41f com & com security already initialized by here 2020-11-25 20:06:43 -08:00
Grant Limberg
95da2bcbcf move CoUninitialize to the proper place at the end of the tap thread 2020-11-19 14:13:16 -08:00
Grant Limberg
a9e4fb0ed9 Fix multiple networks on Windows 2020-11-19 14:10:34 -08:00
Adam Ierymenko
06730c7d1d BSL date bump 2020-08-20 12:51:39 -07:00
Grant Limberg
d9c4e644de Windows DNS 2020-08-11 18:55:42 -07:00
Grant Limberg
6868e98904 Get stuff building on Windows
Been a minute since any of this has been updated
2020-08-05 16:04:02 -07:00
Adam Ierymenko
52a166a71f
Relicense: GPLv3 -> ZeroTier BSL 1.1 2019-08-23 09:23:39 -07:00
Grant Limberg
d43e810ecb Finally figured out how to update the network interface names on Windows so that they'll be visible in ipconfig, Get-NetAdapter etc. 2019-07-16 15:16:49 -07:00
Joseph Henry
0e597191b8 Updated licenses for 2019 2019-01-14 10:25:53 -08:00
Grant Limberg
2ee358dbfc TAP driver requires input and output buffers for calls passed into DeviceIoControl
Otherwise the driver returns STATUS_INVALID_PARAMETER and the call fails.  This should fix some Multicast issues on Windows
2018-02-23 13:42:02 -08:00
Adam Ierymenko
d6e8a5f3ca Fix Windows compile error. 2018-01-30 16:07:41 -08:00
Adam Ierymenko
65c07afe05 Copyright updates for 2018. 2018-01-08 14:33:28 -08:00
Grant Limberg
629a3a2a24 call setFriendlyName() after tap adapter is initialized 2017-10-16 12:16:05 -07:00
Adam Ierymenko
88997a0314 Windows build fixes. 2017-07-06 16:29:11 -07:00
Adam Ierymenko
d2415dee00 Cleanup. 2017-07-06 16:11:11 -07:00
Adam Ierymenko
355cce3938 Rename Utils::snprintf due to it being a #define on one platform. 2017-06-27 11:31:29 -07:00
Adam Ierymenko
d5ed025871 Support MTU reconfigure for Windows. 2017-05-04 19:50:02 -07:00
Adam Ierymenko
b55422a528 MTU integration in taps. 2017-05-04 19:31:50 -07:00
Adam Ierymenko
1b68d6dbdc License header update. 2017-04-27 20:47:25 -07:00
Adam Ierymenko
e4896b257f Add thread PTR that gets passed through the entire ZT core call stack and then passed to handler functions resulting from a call. 2017-03-27 17:03:17 -07:00
Grant Limberg
e2b1a7157e Potential fix for routing issue on Windows
Move setting _initialized = true until after WindowsEthernetTap::threadMain() has actually created and brought up the adapter.  Also in OneService::nodeVirtualNetworkConfigFunction(), wait up to 5 seconds for WindowsEthernatTap::isInitialized() to return true before attempting to configure the interface and managed routes.  Without this, the adapter doesnt actually exist yet when trying to add routes
2017-01-05 11:43:26 -08:00
Grant Limberg
697520f1f5 Dont write IPv6 addresses to IPv4 sections of registry TCPIP settings.
Also, dont add the prefix length to the IP addresses in there.

Appears to fix Github Issue #357.  Still waiting on some info from Microsoft for confirmation of a few things.
2016-12-09 11:36:01 -08:00
Grant Limberg
56faf774ff Store MTU as String instead of DWORD
WindowsEthernetTap was storing the MTU for the ZeroTier Adapter as a
DWORD.  When changing the value from the network adapter settings UI, it
was stored as a string.  Updated the call when creating the adapter to
store it as a string as windows expects.
2016-11-30 15:18:38 -08:00
Adam Ierymenko
4f237687ce Route management now works on Windows, including default route override! 1.1.6 very close! 2016-06-21 13:54:03 -07:00
Adam Ierymenko
b6f6ed35fc More Windows tweaks and a compile fix. 2016-03-02 19:06:29 -08:00
Adam Ierymenko
d3cb063d13 Tweaks to WindowsEthernetTap to attempt to address GitHub issue #308 and/or GitHub issue #277 -- we can't reproduce yet but I found one area where a spin was possible under certain failure conditions. Maybe. 2016-03-02 18:37:24 -08:00
Adam Ierymenko
4e4fd51117 boring doc stuff 2016-01-12 14:04:55 -08:00
Adam Ierymenko
0d9f33dc4f Fix: (1) Windows stack overflow due to buffer too large in peer deserialize, (2) clean up some other stuff seen during debugging and reduce the sizes of some buffers due to Windows small stack size, (3) remove a redundant try/catch. 2015-11-13 12:14:28 -08:00
Adam Ierymenko
b75bdedaee Manually set DeviceInstanceID since this registry key is missing on Windows Vista and Server 2008. 2015-08-13 15:52:54 -07:00
Adam Ierymenko
620562f7cf Because Windows, because Windows. Now it upgrades correctly from 1.0.1, including automatic driver update from NDIS5 to NDIS6. Also a bit more robust on creating new ports, just in case. 2015-07-30 17:00:57 -07:00
Adam Ierymenko
922d9657b9 Save enumeration of statically assigned IPs so they will always be reassigned on device "power cycle." 2015-07-30 14:10:32 -07:00
Adam Ierymenko
6f46f0e0e1 Because Windows. 2015-07-30 11:57:48 -07:00
Adam Ierymenko
8169b35482 Kill the devcon.exe dependency by dynamically loading cfgmgr32, newdev, and setupapi and using these functions directly. 2015-07-30 11:31:38 -07:00
Adam Ierymenko
56285ec0d4 Another attempt at a fix for all the Windows driver coma issues. 2015-07-06 17:58:04 -07:00
Adam Ierymenko
494681a482 This might be a final fix for GitHub issue #173 and possibly others: ACTIVELY detect borked port status on Windows and if any "cable unplugged" or other wacky states are detected whack the adapter (close and reopen). Tested adding a whole bunch of windows networks, removing, adding more, etc. and it seems to work very well! 2015-06-12 16:02:04 +02:00
Adam Ierymenko
6fc090eb00 Don't actually "power cycle" the interface except on startup. Doing that after we're running could lose IP configuration. 2015-05-20 14:21:14 -07:00
Adam Ierymenko
dd70188643 Make tap driver even more defensive... seems to maybe fix the new network problem. Have to test a bit more. 2015-05-19 18:40:34 -07:00
Adam Ierymenko
c7eb5f0c81 Windows build warning removal, be more defensive in Windows tap driver code, and clean up service start/stop in installer. 2015-05-19 18:13:20 -07:00
Adam Ierymenko
241f308334 Fix to tap reset code in Windows tap connector. 2015-05-08 16:49:08 -07:00
Adam Ierymenko
e744580b89 Fix a bunch of Windows tap issues. Turns out NDIS6 allowed us to ditch some NDIS5 cruft, but I did have to add one hack specific to that one instead. Seems reliable now. 2015-05-08 16:31:50 -07:00
Adam Ierymenko
a40192a40b Scratch that wrapper... it was easy to make, but it turns out WebControl is IE4 (!!!?!). Also prefer NDIS5 to NDIS6 *if* NDIS5 is installed. We will no longer ship it, but this will make older installs use the same driver they are already using. Should ease upgrade. 2015-05-08 12:35:03 -07:00
Adam Ierymenko
720ac93ba9 Use NDIS6 driver preferentially if available. 2015-04-25 15:22:43 -07:00
Adam Ierymenko
ce09e363dc Destroy tap devices on Windows 'leave'. 2015-04-24 16:31:19 -07:00
Adam Ierymenko
f5848972f9 Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>. 2015-04-24 15:05:28 -07:00