Commit Graph

1415 Commits

Author SHA1 Message Date
Joseph Henry
1bdced9e91 Merge pull request #252 from zerotier/bugfix/211
Fix #211: Use tcpip_input for IPv6 instead of ethernet_input
2023-08-21 14:21:42 -07:00
Brenton Bostick
8a414d59ea Fix #211: Use tcpip_input for IPv6 instead of ethernet_input 2023-08-21 17:09:10 -04:00
Joseph Henry
af217eb083 Merge pull request #251 from zerotier/bugfix/244 2023-08-21 13:07:46 -07:00
Brenton Bostick
ee5047b59a Fix https://github.com/zerotier/libzt/issues/244:
Memory leak if libzt events aren't consumed by user app
If arg is not enqueued by Events, then treat as if ownership has NOT
been transferred and caller of Events->enqueue is responsible for freeing
2023-08-21 14:05:13 -04:00
Brenton Bostick
f5ffc062e9 rename 2023-08-21 12:20:23 -04:00
Joseph Henry
f800bba4d1 Merge pull request #250 from zerotier/brenton/fix-examples-warnings
fix examples warnings
2023-08-19 08:46:04 -07:00
Joseph Henry
2a8670e5c8 Merge pull request #249 from zerotier/brenton/fix-formatting
fix formatting
2023-08-19 08:45:35 -07:00
Joseph Henry
2ec28b8b87 Merge pull request #248 from zerotier/brenton/fix-redundant-cast
Fix warning: [cast] redundant cast to int
2023-08-19 08:45:13 -07:00
Joseph Henry
b2d5e081a7 Merge pull request #247 from zerotier/brenton/remove-debug-optimization
Remove debug optimization -O3
2023-08-19 08:44:51 -07:00
Joseph Henry
d5ffe38904 Merge pull request #246 from zerotier/brenton/jni-work
Fix fatal error: jni_md.h: No such file or directory
2023-08-19 08:44:35 -07:00
Joseph Henry
67cdb5993c Merge pull request #245 from zerotier/brenton/add-zts_in6addr_any
add ZTS_IN6ADDR_ANY_INIT and zts_in6addr_any
2023-08-19 08:44:09 -07:00
Brenton Bostick
189576719b Fix fatal error: jni_md.h: No such file or directory
And clean up finding JNI in general
Tested on Mac, Linux, and Android
2023-08-18 12:50:54 -04:00
Brenton Bostick
29b20879f7 Remove debug optimization -O3
This was running many optimization passes and preventing debugging
2023-08-18 12:04:33 -04:00
Brenton Bostick
9ca6873c48 add ZTS_IN6ADDR_ANY_INIT and zts_in6addr_any
These mimic IN6ADDR_ANY_INIT and in6addr_any

For setting sin6_addr in zts_sockaddr_in6:
```
struct zts_sockaddr_in6 addr6;
addr6.sin6_addr = zts_in6addr_any;
```
2023-08-18 08:48:12 -04:00
Brenton Bostick
18a2c38f42 Fix warning: [cast] redundant cast to int 2023-08-18 08:46:21 -04:00
Brenton Bostick
84800534e7 fix formatting 2023-08-18 08:43:09 -04:00
Brenton Bostick
b1d088f39c fix examples warnings
warning: incompatible pointer types passing 'int *' to parameter of type 'unsigned short *' [-Wincompatible-pointer-types]
2023-08-18 08:36:31 -04:00
Joseph Henry
624038dd93 Merge pull request #243 from zerotier/bugfix/242
Fix https://github.com/zerotier/libzt/issues/242
2023-08-04 08:49:11 -07:00
Brenton Bostick
dd45f9fb45 Fix https://github.com/zerotier/libzt/issues/242
When processing events, AttachCurrentThread is called, but matching
DetachCurrentThread was not being called

This prevented main thread from exiting
2023-08-04 10:50:30 -04:00
Joseph Henry
dd0d606422 Add missing zts_init_set_low_bandwidth_mode 2023-08-03 15:47:50 -07:00
Joseph Henry
431c4214a5 Merge pull request #239 from zerotier/brenton/fix-incorrect-types
Fix: Incorrect type for parameter 'net_id', which should have type 'j…
2023-08-02 10:13:27 -07:00
Joseph Henry
79636da66e Merge pull request #240 from zerotier/brenton/fix-cannot-resolve-symbol
Fix: Cannot resolve symbol 'localPort'
2023-08-02 10:11:58 -07:00
Brenton Bostick
8aa689034e Fix: Incorrect type for parameter 'net_id', which should have type 'jlong'.
Incorrect return type uint64_t, which should have been jlong.
Incorrect return type uint64_t, which should have been jlong.
Incorrect return type uint64_t, which should have been jlong.
2023-08-02 12:57:48 -04:00
Brenton Bostick
b4c7fd1a0f Fix: Cannot resolve symbol 'localPort'
Remove second bind() with unused backlog arg and identical impl as first
bind()
2023-08-02 12:55:22 -04:00
Joseph Henry
f5eee8d25a Merge pull request #237 from zerotier/brenton/fix-switch
Fix: warning: enumeration value 'TCP_HTTP_OUTGOING' not handled in sw…
2023-08-02 09:20:55 -07:00
Joseph Henry
928d08c482 Merge pull request #238 from zerotier/brenton/fix-reorder-ctor
Fix: field '_lastRestart' will be initialized after field '_tcpFallba…
2023-08-02 09:19:19 -07:00
Brenton Bostick
aede837fea Fix: warning: enumeration value 'TCP_HTTP_OUTGOING' not handled in switch [-Wswitch] 2023-08-02 12:11:47 -04:00
Brenton Bostick
6fe2d49ef1 Fix: field '_lastRestart' will be initialized after field '_tcpFallbackTunnel' [-Wreorder-ctor] 2023-08-02 12:08:07 -04:00
Joseph Henry
02dbc8fa78 Merge pull request #236 from zerotier/brenton/fix-typos
Fix typos and bump ZTO submodule commit to include Fix typos (https:/…
2023-08-02 08:38:12 -07:00
Brenton Bostick
b85a6a4597 Fix typos and bump ZTO submodule commit to include Fix typos (https://github.com/zerotier/ZeroTierOne/pull/2075) 2023-08-02 11:29:22 -04:00
Joseph Henry
2d83bc25f3 Fix tcp relay api logic error 2023-07-26 12:42:43 -07:00
Joseph Henry
10548d9b05 Fix mismatched types in tcp relay api 2023-07-26 12:41:18 -07:00
Joseph Henry
5874e442eb Port over TCP relay functionality from ZeroTier One 2023-07-24 18:56:40 -07:00
Joseph Henry
ca83e941a4 Merge pull request #230 from zerotier/brenton/fix-no-such-file-or-directory-error
fix 'No such file or directory' error
2023-07-20 10:31:06 -07:00
Joseph Henry
e0200fbde0 Merge pull request #231 from zerotier/brenton/fix-return-type-warnings
fix return type warnings
2023-07-20 10:30:01 -07:00
Joseph Henry
a3b3d8217d Merge pull request #232 from zerotier/brenton/fix-missing-jni-function
fix: Cannot resolve corresponding JNI function Java_com_zerotier_sock…
2023-07-20 10:29:50 -07:00
Joseph Henry
1230544134 Merge pull request #233 from zerotier/brenton/fix-unused-warnings
fix unused warnings
2023-07-20 10:29:28 -07:00
Brenton Bostick
a0ffaec02c fix return type warnings
Not any of these functions are used in ZeroTierNative.java

libzt/src/bindings/java/JavaSockets.cxx:600:1: warning: non-void function does not return a value [-Wreturn-type]
libzt/src/bindings/java/JavaSockets.cxx:620:1: warning: non-void function does not return a value [-Wreturn-type]
libzt/src/bindings/java/JavaSockets.cxx:629:1: warning: non-void function does not return a value [-Wreturn-type]
libzt/src/bindings/java/JavaSockets.cxx:638:1: warning: non-void function does not return a value [-Wreturn-type]
2023-07-19 15:50:14 -04:00
Brenton Bostick
fd000261d6 fix 'No such file or directory' error
Using a wildcard in cp was breaking the command when more than 1 file is
present
```
brenton@Brentons-MacBook-Air libzt % ./build.sh android-aar "release"

<< build release aar >>

brenton@Brentons-MacBook-Air libzt % 
brenton@Brentons-MacBook-Air libzt % ./build.sh android-aar "debug"  

<< build debug aar >>

...

BUILD SUCCESSFUL in 48s
33 actionable tasks: 28 executed, 5 up-to-date
cp: target '/Users/brenton/development/github/libzt/dist/android-any-android-debug/libzt-debug.aar': No such file or directory
/Users/brenton/development/github/libzt

 - Build cache  : /Users/brenton/development/github/libzt/cache/android-any-android-debug
 - Build output : /Users/brenton/development/github/libzt/dist

0	/Users/brenton/development/github/libzt/dist/android-any-android-debug
brenton@Brentons-MacBook-Air libzt %
```
2023-07-19 15:48:53 -04:00
Brenton Bostick
88681c02c4 fix: Cannot resolve corresponding JNI function Java_com_zerotier_sockets_ZeroTierNative_zts_1net_1get_1mac. 2023-07-19 15:47:12 -04:00
Brenton Bostick
6ce18af3e6 fix unused warnings
libzt/src/bindings/java/JavaSockets.cxx:40:10: warning: unused variable 'rs' [-Wunused-variable]
libzt/src/Events.cpp:185:14: warning: unused variable 'rs' [-Wunused-variable]
libzt/src/Events.cpp:189:18: warning: unused variable 'arg' [-Wunused-variable]
libzt/src/NodeService.cpp:1064:17: warning: variable 'err' set but not used [-Wunused-but-set-variable]
2023-07-19 15:19:40 -04:00
Travis LaDuke
279fc187d6 Merge pull request #229 from zerotier/brenton/fix-links
Brenton/fix links
2023-07-19 08:55:57 -07:00
Travis LaDuke
f856f04956 Merge pull request #228 from zerotier/brenton/fix-typos
Brenton/fix typos
2023-07-19 08:55:33 -07:00
Brenton Bostick
8066b0e81f fix typos 2023-07-19 10:39:11 -04:00
Brenton Bostick
8d6d515bee fix links 2023-07-19 10:28:31 -04:00
Joseph Henry
9f363342d9 Fix typo in return type 2023-07-18 13:06:19 -07:00
Joseph Henry
27805f8ff2 Add low-bandwidth mode 2023-07-18 13:04:40 -07:00
Joseph Henry
e60239329c Bump ZTO submodule commit to include iOS fix 2023-07-17 16:53:09 -07:00
Joseph Henry
cf07630272 Merge pull request #227 from zerotier/brenton/update-examples
Update examples:
2023-06-30 10:44:23 -07:00
Brenton Bostick
fad04bf3c7 Update examples:
Remove empty MainActivity.java Android example
fix CMake variable BUILD_EXAMPLES -> BUILD_HOST_EXAMPLES
fix some names in example usage messages:
pingable-node -> callbackapi
client -> nonblockingclient
server -> nonblockingserver
pingable-node -> statistics
2023-06-30 12:11:24 -04:00