Correct a type mismatch In one place in the source code, the debug level of type `int` was used and in other places of type `debug_t`. This commit introduces a change so that the type `debug_t` is used in both places. This also resolves a compiler warning. Signed-off-by: Marek Küthe <m.k@mk16.de>
Add timeouts to 'tinc join' Since server tarpits suspicious connections, `tinc join` doesn't have the best UX (if anything is broken on server's side, `tinc join` just hangs indefinitely). Since we don't want to leak information to the client, add timeouts on the client side and notify the user that something is amiss if timeout is reached.
Add tests for some device & address variables
Fix listen_sockets overflow in close_network_connections() ==32610==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000f4f6a8 at pc 0x000000533bd6 bp 0x7ffeafc6f390 sp 0x7ffeafc6f388 READ of size 8 at 0x000000f4f6a8 thread T0 #0 0x533bd5 in io_del /home/runner/work/tinc/tinc/openssl3/../src/linux/event.c:104:9 #1 0x4f4808 in close_network_connections /home/runner/work/tinc/tinc/openssl3/../src/net_setup.c:1283:3 #2 0x4cea70 in main /home/runner/work/tinc/tinc/openssl3/../src/tincd.c:717:2 #3 0x7f493a1d3d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #4 0x7f493a1d3e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #5 0x421ac4 in _start (/home/runner/work/tinc/tinc/openssl3/src/tincd+0x421ac4) 0x000000f4f6a8 is located 8 bytes to the right of global variable 'listen_socket' defined in '../src/net_socket.c:48:17' (0xf4f0e0) of size 1472 SUMMARY: AddressSanitizer: global-buffer-overflow /home/runner/work/tinc/tinc/openssl3/../src/linux/event.c:104:9 in io_del
Shorter paths to PID files in integration tests Tests were running into the 108-char limit on UNIX socket path length. Since we don't care about saving PID files and sockets for further analysis if anything does wrong with the test, just shove them into a temporary directory (which is likely to have a very short name).
Extract filesystem-related functions into fs.c … and add unit tests.
Improve recently seen address cache - create cache directory on init - only remember addresses for TCP connections - update cache in more situations - add tests
Reflow all Markdown files. Use MarkFlow to reflow the Markdown files so they can be read as a text file in a 80-column terminal. Also convert all code blocks into fenced code blocks with a language header, and remove the prompt character; this allows viewers to do syntax highlighting, and allows a human reading the files using a text viewer to simply copy&paste the commands.