Branch: refs/heads/stable1 Home: https://github.com/kronosnet/kronosnet Commit: 8897360bac547a2c9e65bafde1b463eb18006337 https://github.com/kronosnet/kronosnet/commit/8897360bac547a2c9e65bafde1b463... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-01-22 (Thu, 22 Jan 2026)
Changed paths: M Makefile.am M configure.ac M kronosnet.spec.in M libknet/Makefile.am M libknet/crypto.c M libknet/handle.c M libknet/threads_common.c A libknet/wireshark/Makefile.am A libknet/wireshark/packet-kronosnet.c A libknet/wireshark/packet-kronosnet.h
Log Message: ----------- Wireshark dissector for kronosnet
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Signed-off-by: Christine Caulfield ccaulfie@redhat.com
Commit: 603941eae1ff9d72f1973e105346d4d62ec7256b https://github.com/kronosnet/kronosnet/commit/603941eae1ff9d72f1973e105346d4... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-04-20 (Mon, 20 Apr 2026)
Changed paths: A CLAUDE.md
Log Message: ----------- add CLAUDE.md documentation for AI-assisted development
Provides comprehensive guidance for Claude Code including: - Build system and testing commands - Architecture overview of libknet threading, transport, and plugin model - Code style guidelines and API requirements - Platform-specific configuration notes
Incorporates review feedback: - Clarify that _function_name functions are non-thread-safe and require external locking by callers - Note that crates.io Rust bindings are outdated (4+ years old) and recommend building from source instead
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 8ca310a7964cde3972a1be92d504081a5d1cc299 https://github.com/kronosnet/kronosnet/commit/8ca310a7964cde3972a1be92d50408... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-04-25 (Sat, 25 Apr 2026)
Changed paths: M libknet/crypto_openssl.c
Log Message: ----------- libknet: improve OpenSSL error logging to print entire error stack
Fixes #456
The OpenSSL crypto module previously used ERR_error_string_n(ERR_get_error()) which only retrieved and logged the first error from OpenSSL's error queue. When multiple errors occur, they are all pushed onto the error stack, and only logging the first error can make debugging difficult.
This patch introduces a new helper function log_openssl_errors() that: - Iterates through the entire OpenSSL error stack using ERR_get_error() in a loop until it returns 0 - Formats each error using ERR_error_string_n() - Logs each error at the appropriate level (ERR or DEBUG) - Marks subsequent errors with "additional error:" prefix for clarity - Automatically clears the error stack after logging
All error reporting call sites have been updated to use this helper, eliminating local sslerr buffers that are no longer needed.
Benefits: - Complete error context: All errors in the stack are now visible - Better debugging: Easier to diagnose complex OpenSSL failures - Cleaner code: Removes repetitive error handling boilerplate
Reported-by: Dmitry Belyavskiy beldmit@gmail.com Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 16ddc2ccb0c1dfeaf175508746e81c73f8ca35bc https://github.com/kronosnet/kronosnet/commit/16ddc2ccb0c1dfeaf175508746e81c... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths: M .gitignore
Log Message: ----------- build: add .claude to .gitignore
Prevent accidental commit of Claude Code session data and configuration. The .claude directory contains user-specific settings, conversation history, and temporary files that should not be tracked in version control.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: ef010fc583e8ae8e7bf120c14a60c18a63114542 https://github.com/kronosnet/kronosnet/commit/ef010fc583e8ae8e7bf120c14a60c1... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths: M libknet/wireshark/Makefile.am
Log Message: ----------- build: fix wireshark build to use correct libqb headers
spotted in CI when a node lost libqb-devel from the system and CI libqb build was not used.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com
Commit: 4494509ec3894e006807740b1f577fcd5053859f https://github.com/kronosnet/kronosnet/commit/4494509ec3894e006807740b1f577f... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libknet/logging.c M libknet/threads_tx.c
Log Message: ----------- Suppress Coverity false positives for MISSING_LOCK and UNINIT
Fixed two Coverity false positive warnings:
1. MISSING_LOCK in threads_tx.c (_dispatch_to_local): - Access to knet_h->sockfd[channel].is_created flagged as unguarded - Lock is actually held by caller (_handle_send_to_links_thread) - Added local variable to read value once with suppression annotation
2. UNINIT in logging.c (log_msg): - va_list 'ap' flagged as uninitialized before va_start - va_start IS the initialization, but Coverity doesn't understand this - Restructured early returns and added suppression annotation
Both issues are false positives. The code is correct, but Coverity's dataflow analysis cannot detect the lock acquisition in the call chain or understand va_start semantics.
Coverity scan now reports 0 defects (down from 2).
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: e64ba14ea9ce3e9212c9522de66f98ca1dbcb668 https://github.com/kronosnet/kronosnet/commit/e64ba14ea9ce3e9212c9522de66f98... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libknet/threads_rx.c
Log Message: ----------- Suppress Coverity INCONSISTENT_UNION_ACCESS false positive in threads_rx.c
The PMTUD reply handling in stable1-proposed accesses inbuf->khp_pmtud_size within a switch/case that ensures it's the correct union field (case KNET_HEADER_TYPE_PMTUD_REPLY). Coverity incorrectly flags this as inconsistent with an earlier khp_ping access from a different case.
On main branch, this code was refactored into separate process_pmtud_reply() function (commit c2520f61 from 2020), which breaks the dataflow path that confuses Coverity. Since stable1-proposed maintains the original inline structure, we add a suppression here.
This is a stable1-proposed specific false positive.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 96ab3af93a91dfec07d0dd3d59a2d86e2dcf8251 https://github.com/kronosnet/kronosnet/commit/96ab3af93a91dfec07d0dd3d59a2d8... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/libnozzle.c
Log Message: ----------- libnozzle: use IFF_TUN_EXCL for exclusive TAP device creation
Add IFF_TUN_EXCL flag when creating named TAP devices to prevent race conditions where another process creates the same device name between check and creation. Available since Linux 3.4 with graceful fallback.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: ee42ef3d2a0c640a445bd0f66fcfc5228b55f033 https://github.com/kronosnet/kronosnet/commit/ee42ef3d2a0c640a445bd0f66fcfc5... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/libnozzle.c
Log Message: ----------- libnozzle: improve libnl error code translation
Replace generic errno values with proper error code translation from libnl. Add nlerr_to_errno() helper that maps NLE_* codes to standard errno values for better diagnostics when netlink operations fail.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 27c21b1ff071c066860012343020c383df503e99 https://github.com/kronosnet/kronosnet/commit/27c21b1ff071c066860012343020c3... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/internals.h M libnozzle/libnozzle.c
Log Message: ----------- libnozzle: implement FreeBSD native ioctl for IP address management
Replace shell command execution with native ioctl calls using struct in_aliasreq (IPv4) and struct in6_aliasreq (IPv6). Use separate AF_INET and AF_INET6 sockets for proper address family handling.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: a5d4543aa4cdcc5d3b0fc64fc909dcdaf8181a62 https://github.com/kronosnet/kronosnet/commit/a5d4543aa4cdcc5d3b0fc64fc909dc... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/libnozzle.c
Log Message: ----------- libnozzle: implement Solaris native ioctl for IP address management
Replace shell command execution with native ioctl calls using struct lifreq. Use per-interface AF_INET and AF_INET6 sockets for IPv4/IPv6 operations. Set secondary=1 for IPv6 address deletion to match Solaris logical interface semantics.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: c098678dd0c425a01ef18b2e1d108fbdbffa909c https://github.com/kronosnet/kronosnet/commit/c098678dd0c425a01ef18b2e1d108f... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/Makefile.am M libnozzle/internals.h M libnozzle/libnozzle.c A libnozzle/libnozzle_bsd.c A libnozzle/libnozzle_linux.c A libnozzle/libnozzle_solaris.c
Log Message: ----------- libnozzle: refactor platform-specific code into dedicated files
Split platform-specific implementation from libnozzle.c into dedicated files: libnozzle_linux.c, libnozzle_bsd.c, libnozzle_solaris.c.
Introduce platform abstraction layer with typedefs and macros in internals.h: - nozzle_ifreq: Platform-specific ifreq structure type - NOZZLE_SOCKET_DOMAIN: Socket domain for ioctl fd (AF_LOCAL on BSD) - NOZZLE_IOCTL_FD: File descriptor for ioctl operations - NOZZLE_SET_MTU: Platform-specific MTU ioctl command - NOZZLE_IPV6_IS_SECONDARY(domain): IPv6 secondary interface check
This eliminates all platform-specific #ifdef blocks from libnozzle.c, improving code organization and readability. Platform differences are now documented in a single location (internals.h and platform-specific files) rather than scattered throughout the main code.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 457c43187316eb8cdebafa2a134103b48504550e https://github.com/kronosnet/kronosnet/commit/457c43187316eb8cdebafa2a134103... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/internals.c M libnozzle/internals.h M libnozzle/libnozzle_bsd.c M libnozzle/libnozzle_linux.c M libnozzle/libnozzle_solaris.c
Log Message: ----------- libnozzle: refactor IP address helpers to reduce code duplication
Extract common IP address calculation logic from platform-specific functions into shared helpers. Add _determine_family(), _validate_prefix(), _ipv4_prefix_to_netmask(), and _ipv6_prefix_to_mask() to internals.c/h. Include netinet/in.h in both files for struct in6_addr definition.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 31d81d36d28e98d01362a05195b1423de60ab670 https://github.com/kronosnet/kronosnet/commit/31d81d36d28e98d01362a05195b142... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/libnozzle_bsd.c M libnozzle/libnozzle_linux.c M libnozzle/libnozzle_solaris.c
Log Message: ----------- libnozzle: consolidate platform-specific add_ip/del_ip implementations
Consolidate duplicate add/delete logic into platform-specific helpers: Linux uses _netlink_modify_addr() for netlink operations, BSD uses _bsd_modify_ipv4/6() for ioctl operations, Solaris uses _solaris_modify_ipv4/6() with secondary interface support. Eliminates ~80 lines of duplication.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: d71073bf934aace1b3b845feccd94077df941d16 https://github.com/kronosnet/kronosnet/commit/d71073bf934aace1b3b845feccd940... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/tests/Makefile.am
Log Message: ----------- [tests] Disable parallel execution for libnozzle tests
Add .NOTPARALLEL to prevent tap device resource contention on systems that are slow to open/close tap devices.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 028a7899002c1f2a455dc73d57cc400f2998a7d2 https://github.com/kronosnet/kronosnet/commit/028a7899002c1f2a455dc73d57cc40... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libnozzle/libnozzle.c M libnozzle/tests/Makefile.am A libnozzle/tests/api_nozzle_prefix_validation.c
Log Message: ----------- libnozzle: add input validation for network prefixes
Replace atoi() with strtol() for network prefix validation to properly detect invalid input, overflow, and out-of-range values.
Add comprehensive test coverage for prefix validation scenarios.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 28ee22805edf3bf19d2f883f878d9cd55679e998 https://github.com/kronosnet/kronosnet/commit/28ee22805edf3bf19d2f883f878d9c... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths: M libknet/threads_pmtud.c
Log Message: ----------- libknet: force PMTUD rerun after reschedule interruption
When PMTUD is interrupted by a reschedule request (returns EDEADLK), some links may have been checked while others were skipped. The next iteration uses the interval timer to decide which links to check, which means recently-checked links are skipped even if they need a new PMTUD run (e.g., after reconnection following onwire protocol upgrade).
Fix by setting pmtud_forcerun=1 when the PMTUD thread detects it was interrupted (errno == EDEADLK). This ensures the next iteration force-runs PMTUD on all links regardless of the interval timer, completing discovery on interrupted and skipped links.
This approach respects the 2018 commit d2a6344f design by setting forcerun in the PMTUD thread itself (after the interrupted iteration completes) rather than in _pmtud_reschedule() or its callers, avoiding the lock fighting and scheduling issues that commit addressed.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: d02d1faa79a230d8ffd5e50b9f5a54ba92406a15 https://github.com/kronosnet/kronosnet/commit/d02d1faa79a230d8ffd5e50b9f5a54... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am M libknet/tests/api-check.mk M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_id_by_name.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_get_transport_name_by_id.c M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_loglevel_name.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_get_subsystem_name.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/int_links_acl_ip.c M libknet/tests/int_timediff.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: migrate to unified logging infrastructure
Convert all 86 tests to start_logging/stop_logging pattern with timestamped [testsuite] markers. Replace printf() in test functions with log_test(). Remove old logging infrastructure and rename macros to standard names.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 87e481eeb5485cf609ff32c052bf1e14de8e1757 https://github.com/kronosnet/kronosnet/commit/87e481eeb5485cf609ff32c052bf1e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_id_by_name.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_get_transport_name_by_id.c M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_loglevel_name.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_get_subsystem_name.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/int_links_acl_ip.c M libknet/tests/int_timediff.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: standardize test result output with TEST_EXIT macro
Add [PASS]/[FAIL]/[SKIP]/[ERROR] markers to all test output. Rename CLEAN_EXIT to TEST_EXIT_CLEAN for clarity.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: d56f6b10259451578209cfaab5543a70c85a8ec2 https://github.com/kronosnet/kronosnet/commit/d56f6b10259451578209cfaab5543a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: rename knet_* test helpers to _ts_knet_* to avoid namespace collision
Rename test suite helpers that wrap libknet API to use _ts_ prefix (test suite) to clearly distinguish them from the public libknet API functions: - knet_handle_start → _ts_knet_handle_start - knet_handle_stop_everything → _ts_knet_handle_stop_everything - knet_handle_start_nodes → _ts_knet_handle_start_nodes - knet_handle_join_nodes → _ts_knet_handle_join_nodes - knet_handle_disconnect_links → _ts_knet_handle_disconnect_links - knet_handle_reconnect_links → _ts_knet_handle_reconnect_links - _knet_link_set_config → _ts_knet_link_set_config
This prevents confusion between test infrastructure and library API.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: a961c530dc5bb837bd123a79ee3ac4974da89457 https://github.com/kronosnet/kronosnet/commit/a961c530dc5bb837bd123a79ee3ac4... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: improve test infrastructure and fix issues
Standardize test_sleep() to take logfd instead of knet_h. Fix knet_bench infrastructure. Remove redundant TESTNODES definitions.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 15f7bc8cb3ba4163aab1a4f18054ce3205cf93bc https://github.com/kronosnet/kronosnet/commit/15f7bc8cb3ba4163aab1a4f18054ce... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: improve error handling and use named constants
Add FAIL_ON_SUCCESS macro for consistent API error checking. Consolidate timeout handling with adjust_timeout_for_valgrind(). Replace magic numbers with TEST_TIMEOUT_* and TEST_PORT_* constants.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 1ca636f9b4444437c76610fd66d5a4a545511c47 https://github.com/kronosnet/kronosnet/commit/1ca636f9b4444437c76610fd66d5a4... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/test-common.h
Log Message: ----------- tests: add NOCLEAN macro variants for tests without knet handles
Add FAIL_ON_ERR_NOCLEAN and FAIL_ON_SUCCESS_NOCLEAN macros for tests that don't create knet handles and don't need cleanup infrastructure.
Convert 5 API tests to use new macros (11 error checks total): - api_knet_addrtostr.c (4 checks) - api_knet_strtoaddr.c (4 checks) - api_knet_get_compress_list.c (1 check) - api_knet_get_crypto_list.c (1 check) - api_knet_get_transport_list.c (1 check)
Reduces test code by 37 lines and improves consistency with other tests.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 2f91dee638630984fbd3672bcf5a9a43704a440e https://github.com/kronosnet/kronosnet/commit/2f91dee638630984fbd3672bcf5a9a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/Makefile.am M libknet/crypto.c M libknet/crypto_nss.c M libknet/libknet.h M libknet/libknet_exported_syms M libknet/tests/api-check.mk A libknet/tests/api_knet_get_crypto_cipher_list.c A libknet/tests/api_knet_get_crypto_hash_list.c M man/Makefile.am
Log Message: ----------- Add API to enumerate supported cipher modes and hash algorithms
Implements issue #478 by introducing two new API functions: - knet_get_crypto_cipher_list(): Returns AES cipher modes (CBC/CTR) supported across all crypto backends - knet_get_crypto_hash_list(): Returns hash algorithms supported across all crypto backends
Both functions return the intersection of capabilities across OpenSSL, NSS, and libgcrypt backends. Applications can reliably use any returned cipher/hash combination regardless of which crypto module is loaded.
The cipher list includes both OpenSSL-style hyphenated names (aes-128-cbc) and NSS/libgcrypt non-hyphenated names (aes128) as separate entries.
New structures: - knet_crypto_cipher_info: const char *name, const char *mode, int key_bits - knet_crypto_hash_info: const char *name, int hash_bits
Updated NSS parser to accept hyphenated CBC cipher names (aes-128-cbc, aes-192-cbc, aes-256-cbc) in addition to non-hyphenated variants.
Includes comprehensive tests verifying all returned ciphers and hashes work with all three crypto backends.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 662b1b0aeb75d79f330c932807671b3e2046107b https://github.com/kronosnet/kronosnet/commit/662b1b0aeb75d79f330c932807671b... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_get_crypto_cipher_list.c M libknet/tests/api_knet_get_crypto_hash_list.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: cleanup and add comprehensive documentation
Remove flush_logs(), dead code, and unused FILE parameters. Add detailed documentation to test-common.h for all macros and helpers. Port crypto enumeration API tests to new infrastructure.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 47374edb6ecf6f84e6008ab33fe21e4dae10d608 https://github.com/kronosnet/kronosnet/commit/47374edb6ecf6f84e6008ab33fe21e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: export find_plugins_path() for rust bindings
The find_plugins_path() function must be non-static because it is used by the rust test suite (libknet/bindings/rust/tests/src/bin/set_plugin_path.c).
Changes: - Remove static qualifier from find_plugins_path() in test-common.c - Add declaration to test-common.h with updated signature (int logfd) - Update rust test code to pass STDOUT_FILENO as logfd parameter
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 7555f2c691562c0abb2e8e7de1c8a840b2dce947 https://github.com/kronosnet/kronosnet/commit/7555f2c691562c0abb2e8e7de1c8a8... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- [tests] Add runtime log filter callback infrastructure
Add thread-safe log filter callback mechanism for runtime pattern matching in test logs. The log thread invokes registered callbacks for each log line, allowing tests to detect specific messages without parsing log files.
Features: - install_log_filter() to register/unregister callbacks - check_log_pattern_found() to query if pattern was matched - Thread-safe via mutex protection - Callback receives logfd for use with log_test() facility
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 6f6863d8d4348cec68d2cb6eaa7b06b1537caaa5 https://github.com/kronosnet/kronosnet/commit/6f6863d8d4348cec68d2cb6eaa7b06... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- [tests] Add packet injection helper for RX validation testing
Add inject_packet() helper to construct and inject packets directly into link sockets for testing RX thread validation logic without requiring network-level packet manipulation.
Supports: - DATA packets with configurable fragmentation fields - PING packets with configurable link_id - Controlled sequence numbers to avoid deduplication - Tests can forge invalid packets to verify rejection logic
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: fc9f3b5f3d7435e0d7a5b8b405785f447a7af1f8 https://github.com/kronosnet/kronosnet/commit/fc9f3b5f3d7435e0d7a5b8b405785f... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_send_loopback.c
Log Message: ----------- [tests] Use FAIL_ON_* macros consistently in send tests
Replace manual if statement error checking with FAIL_ON_SUCCESS and FAIL_ON_ERR macros for consistency with the rest of the test suite.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 08029d9740817f33bc475c9db5253d8b9ab137b6 https://github.com/kronosnet/kronosnet/commit/08029d9740817f33bc475c9db5253d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/test-common.c
Log Message: ----------- [tests] Fix parallel port allocation race in _ts_knet_handle_join_nodes
The existing port allocation used predictable node ID-based calculations, causing EADDRINUSE errors when tests run in parallel and multiple nodes try to bind the same port simultaneously.
Implement two-phase port allocation: - Phase 1: Each node allocates ports by configuring links to a temporary peer, letting _ts_knet_link_set_config find available ports with proper EADDRINUSE retry logic - Phase 2: Reconfigure each link to its actual destination peer, reusing the src_addr already bound in Phase 1
Requires clearing the configured flag between phases (protected by global_rwlock) to allow reconfiguring to a different host_id while keeping the socket bound.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 29c35d3eb58689477ba2a49e6206ad9e914018f1 https://github.com/kronosnet/kronosnet/commit/29c35d3eb58689477ba2a49e6206ad... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/knet_bench.c
Log Message: ----------- [tests] improve input validation in knet_bench test tool
Replace atoi() with safe_atoi() helper that uses strtol() for proper error detection. Improves developer experience with better error messages.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 1ffb2b44c4bc05f3b3722e4d7bd25d73a74a9040 https://github.com/kronosnet/kronosnet/commit/1ffb2b44c4bc05f3b3722e4d7bd25d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_decompress_bufsize.c M libknet/tests/test-common.c M libknet/tests/test-common.h M libknet/threads_rx.c
Log Message: ----------- libknet: add decompression buffer size validation
Add validation to reject packets where decompressed size exceeds KNET_DATABUFSIZE, preventing buffer overflows in decompression.
Add int_decompress_bufsize test that verifies packets with oversized decompressed payloads are properly rejected with appropriate logging.
Backport notes: - Adapted for onwire protocol v0 (removed onwire_v1.h include) - Updated knet_handle_add_datafd call to 3-parameter stable1 API - Added zlib_LIBS to test LDADD for direct zlib function calls - Updated inject_packet to use KNET_HEADER_VERSION constant
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: ec943ab1a07271ce2750ccd54b8a54cc36fb5e60 https://github.com/kronosnet/kronosnet/commit/ec943ab1a07271ce2750ccd54b8a54... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/host.c
Log Message: ----------- libknet: fix defragmentation buffer reclamation logic
Fix bug in the defragmentation buffer reclamation logic that prevents efficient memory management:
Window calculation was using the old received sequence number (dst_seq_num) instead of the current packet's sequence number (seq_num) to calculate the valid buffer window. This caused buffers to be reclaimed based on stale sequence information, potentially freeing buffers that should still be valid or keeping buffers that should be reclaimed.
The valid sequence number window is calculated based on the current packet's seq_num to ensure proper reclamation of stale defragmentation buffers.
Backport notes: - In stable1, KNET_DEFRAG_BUFFERS is the actual allocated count (32), equivalent to host->allocated_defrag_bufs in main - stable1 uses defrag_buf (singular) instead of defrag_bufs (plural) - _reclaim_old_defrag_bufs doesn't take knet_h parameter in stable1
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: df8b87afda0689ffd891aaa213d3655470b3ee83 https://github.com/kronosnet/kronosnet/commit/df8b87afda0689ffd891aaa213d365... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/host.c
Log Message: ----------- libknet: fix sequence number wraparound calculation in defragmentation
The distance calculation between sequence numbers was incorrect when wraparound occurred. The formula was backwards: it subtracted in the wrong direction and didn't account for the +1 needed for modular arithmetic.
This caused incorrect buffer reclamation decisions near the SEQ_MAX boundary.
Practical examples (SEQ_MAX = 65535):
Example 1 - Normal case (no wraparound): Last packet: dst_seq_num = 1000 New packet: seq_num = 1005 Expected distance: 5
BEFORE (wrong): seq_dist = dst_seq_num - seq_num = 1000 - 1005 = -5 (negative!)
AFTER (correct): seq_dist = seq_num - dst_seq_num = 1005 - 1000 = 5
Example 2 - Wraparound case: Last packet: dst_seq_num = 65534 New packet: seq_num = 3 (wrapped around) Expected distance: 5 (65534→65535→0→1→2→3)
BEFORE (wrong): seq_dist = (SEQ_MAX - seq_num) + dst_seq_num seq_dist = (65535 - 3) + 65534 = 131066 (huge wrong number!)
AFTER (correct): seq_dist = (SEQ_MAX - dst_seq_num) + seq_num + 1 seq_dist = (65535 - 65534) + 3 + 1 = 5
The +1 accounts for the transition from 65535→0 being one step, not zero.
Verification that circular buffer cleaning is not broken:
The seq_dist value is used to determine whether the new packet is: a) Within the circular buffer window (seq_dist < KNET_CBUFFER_SIZE) b) Far enough to require full buffer clear (seq_dist > threshold) c) Should trigger incremental cleaning (fall through case)
Test case 1 - Normal sequential packet: dst_seq_num = 1000, seq_num = 1005, expected distance = 5
BEFORE: seq_dist = -5 (unsigned overflow ~65530) → Incorrectly clears entire buffer for normal sequential packets!
AFTER: seq_dist = 5 → Correctly identifies packet as within buffer window, no clearing needed
Test case 2 - Wraparound (close distance): dst_seq_num = 65534, seq_num = 3, expected distance = 5
BEFORE: seq_dist = 131066 → Falls through to circular buffer cleaning code incorrectly
AFTER: seq_dist = 5 → Correctly identifies packet as within buffer window
Test case 3 - Large jump requiring buffer clear: dst_seq_num = 1000, seq_num = 50000, expected distance = 49000
BEFORE: seq_dist = -49000 (unsigned ~16536) → Clears buffer (correct by accident)
AFTER: seq_dist = 49000 → Clears buffer (correct by design)
The circular buffer cleaning code (lines 673-684) uses seq_num and dst_seq_num directly via modulo operations to find buffer positions. It does not use seq_dist for position calculations, only for the threshold check to determine whether to run. The fix corrects the threshold logic without affecting the position calculations.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 97d059c2c7424b111c61d0c2c9432e24be963597 https://github.com/kronosnet/kronosnet/commit/97d059c2c7424b111c61d0c2c9432e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_seq_wraparound_stress.c
Log Message: ----------- [tests] add comprehensive sequence number wraparound stress test
Add new int_seq_wraparound_stress_test that validates sequence number wraparound handling and defragmentation buffer management under realistic packet loss scenarios.
Test scenarios:
1. Normal sequential with packet loss - validates basic packet handling with gaps in sequence numbers. Sends seq 1000-1006 with some complete (both fragments), some lost (no fragments), and some incomplete (only one fragment). Verifies only complete packets are delivered (4/7).
2. Wraparound boundary with packet loss - validates wraparound crossing from seq 65533 to seq 4 with mixed complete/incomplete/lost packets. Tests special case where sequence numbers wrap from SEQ_MAX (65535) to 0. Verifies 5 complete packets delivered correctly across boundary.
3. Large sequence jump (> KNET_CBUFFER_SIZE) - validates buffer clearing logic when sequence gap exceeds circular buffer size. Sends seq 5000, then jumps to 10000 (5000 packet gap > KNET_CBUFFER_SIZE 4096), triggering buffer reclamation. Verifies all complete packets delivered.
4. Out-of-order fragment delivery - validates fragment assembly when fragments arrive in reverse order (frag 2 before frag 1) for same sequence number. Sends 3 packets with mixed fragment ordering and verifies all packets assembled correctly regardless of fragment order.
5. Out-of-order complete packet delivery - validates handling when complete packets arrive with out-of-order sequence numbers. Sends seq 1000, 1001, 999 (last one arrives late) and verifies all 3 packets are delivered.
6. Extreme packet loss beyond receive window - validates recovery from massive packet loss exceeding KNET_CBUFFER_SIZE. Creates incomplete packets at seq 30000-30002, then jumps to 35000 (5000 gap), tests buffer clearing and continued operation. Verifies 5 complete packets.
7. Wraparound with extreme packet loss - validates wraparound combined with massive loss. Sends seq 60000-60001, then jumps to 100-103 (gap = 5636 packets wrapping around + exceeding buffer size). Verifies buffer clearing across wraparound and 5 complete packets.
8. Wraparound stress with multiple cycles and duplicate detection - rapidly cycles through wraparound boundary (65530-65535-0-10) twice with different packet filters. First cycle sends packets where (seq % 3) != 0, second cycle sends packets where (seq % 3) != 1. Tests duplicate rejection and verifies only unique sequence numbers are delivered.
9. Fragment corruption across wraparound - validates protection against historical bug where fragments from different packet transmissions could be incorrectly mixed. Sends seq 5000 frag 1 filled with 'A', advances through complete wraparound (65536 sequences), sends seq 5000 frag 2 filled with 'B'. Verifies old fragment 1 was invalidated and no corrupted packet delivered (mixing A+B fragments).
10. Defragmentation buffer reclamation window calculation - validates _reclaim_old_defrag_bufs() correctly reclaims buffers outside current sequence window using seq_num (not dst_seq_num). Creates incomplete fragments at seq 100, 105, 110, 115, 120, then advances window to seq 150. Verifies buffers outside window (100-115) are reclaimed and buffer within window (120) is preserved.
11. Circular buffer clearing at boundaries - validates _seq_num_lookup correctly clears circular_buffer ranges in both wraparound (tail > head) and normal (tail <= head) cases. Test case 1: seq 3000 → 10 creates tail=3001 > head=10, should clear [3001..4095] and [0..10]. Test case 2: seq jump to 8191 creates tail=0 <= head=4095, should clear [0..4095].
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 5e11667b5324aaf775294807882754f87bb353d2 https://github.com/kronosnet/kronosnet/commit/5e11667b5324aaf775294807882754... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_defrag_edge_cases.c
Log Message: ----------- [tests] add defragmentation edge cases test suite
Add new int_defrag_edge_cases_test that validates critical defragmentation buffer management scenarios not covered by existing tests.
Test scenarios:
1. Last fragment arriving first - validates special buffer positioning at KNET_MAX_PACKET_SIZE - len offset, last_first flag handling, and fragment relocation when packet completes. Tests asymmetric MTU with fragments in order [3/3, 1/3, 2/3] and verifies data integrity across all fragments (280 bytes total with distinct payloads 'A', 'B', 'C').
2. Buffer exhaustion and reclamation - validates window-based reclamation when all 32 defrag buffers are filled with incomplete packets. Sends new complete packet with distant sequence number (9000 vs 2000-2031) triggering reclamation of all out-of-window buffers. Verifies data integrity with no corruption from old buffer data in new packet.
3. Fragment data overwrite protection - validates correct assembly of large fragmented packets without buffer overflow. Test case 1 sends 100 fragments × 500 bytes (50,000 bytes total), test case 2 sends 50 fragments × 1,300 bytes (65,000 bytes approaching KNET_MAX_PACKET_SIZE). Each fragment filled with its index number and verified on assembly.
4. Duplicate fragment handling - validates that duplicate fragments (same sequence number and fragment index) are silently rejected without corrupting the buffer. Sends frag 1/2, frag 1/2 (duplicate with different data), frag 2/2 and verifies only one correct packet is delivered with original fragment data preserved.
5. Maximum realistic fragments - validates fragment map can handle high fragment counts (100 fragments, 500 bytes each = 50,000 bytes total). PCKT_FRAG_MAX (255) is theoretical limit, but realistic max is determined by min_mtu. Tests worst-case scenario with min MTU ~550 bytes.
6. Single fragment packets (1/1) - validates degenerate case where packets are marked as fragmented but contain only one fragment. Sends 5 packets of 200 bytes each, all marked as 1/1, and verifies correct delivery without unnecessary defragmentation overhead.
7. Interleaved fragment assembly across wraparound - validates concurrent assembly of multiple fragmented packets with fragments arriving in interleaved order across sequence number wraparound boundary. Sends 4 packets (seq 65534, 65535, 0, 1) with all first fragments, then completes them in reverse order (1→0→65535→65534). Verifies all packets received correctly with no cross-contamination between defrag buffers.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: caa319f422eb889c26d9ec2907cec54ccccd2e27 https://github.com/kronosnet/kronosnet/commit/caa319f422eb889c26d9ec2907cec5... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_buffer_management.c
Log Message: ----------- [tests] add defragmentation buffer reuse test
Add new int_buffer_management_test that validates defragmentation buffer reuse after reclamation to prevent data leakage.
Test scenario:
Buffer reuse after reclamation - validates that reclaimed buffers are properly cleared before reuse, preventing data leakage. Sends incomplete packet at seq 5000 filled with 'X', then complete packet at seq 10000 (distance 5000 > KNET_CBUFFER_SIZE 4096) triggering reclamation. Verifies new packet contains only 'Z' with no trace of 'X', then reuses same buffer with new packet 'M'+'N' and confirms no leakage.
Backport notes: - Tests 1 and 3 from main (dynamic buffer growth/shrinking) are not applicable to stable1 which has fixed KNET_DEFRAG_BUFFERS allocation - Only test 2 (buffer reuse after reclamation) is relevant and backported - This test validates critical buffer clearing behavior that applies equally to both stable1 and main
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: f7e03f23d2390b4d6bab1e2adc2c9ad6063b6e07 https://github.com/kronosnet/kronosnet/commit/f7e03f23d2390b4d6bab1e2adc2c9a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/handle_api.c M libknet/libknet.h M libknet/tests/api_knet_handle_add_datafd.c
Log Message: ----------- libknet: add comprehensive file descriptor validation in knet_handle_add_datafd
Add validation to reject unsupported file descriptor types that would fail at runtime. Reject user-provided AF_UNIX socketpairs (knet needs both ends but API only accepts one), all pipes (bidirectional flow requires two fds), and unconnected/unbound sockets.
Add comprehensive test coverage with both blacklist (rejection) and whitelist (acceptance) tests for various fd types including a SOCK_DGRAM test that validates knet I/O by sending through knet_send and receiving on the peer socket.
Platform-specific handling: - Linux: Character devices fail with EPERM at epoll stage - Older BSD (13/14): Character devices fail with ENODEV at kqueue stage - Newer BSD (15+) and Solaris: Character devices accepted
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 47b98b7309304c1a649e9b6af9a0ce0ed52ed844 https://github.com/kronosnet/kronosnet/commit/47b98b7309304c1a649e9b6af9a0ce... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M CLAUDE.md M README M libknet/libknet.h M libknet/transport_common.c
Log Message: ----------- libknet: use SOCK_DGRAM for internal socketpairs
Change _init_socketpair to use SOCK_DGRAM instead of SOCK_SEQPACKET. SOCK_DGRAM provides atomic message boundaries without requiring MSG_EOR flags.
FreeBSD 15+ changed SEQPACKET to require MSG_EOR for record boundaries, which has critical issues: - sendmsg(..., MSG_EOR) can perform partial writes on FreeBSD - knet's receive path uses readv() which cannot check MSG_EOR flags
Update documentation: - API docs now specify SOCK_DGRAM socketpair creation when datafd=0 - README and CLAUDE.md require net.local.dgram.maxdgram=131072 on FreeBSD (default is 8192 bytes, insufficient for KNET_MAX_PACKET_SIZE + ancillary data)
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 3bc81105ee69cf448d01d0d576159493c1de1332 https://github.com/kronosnet/kronosnet/commit/3bc81105ee69cf448d01d0d5761594... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/test-common.c
Log Message: ----------- tests: fix C99 compliance for mixed declarations and code
Move all variable declarations before executable statements. Fixed 74 test files to comply with C99 standard.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 234ee608ab06abb482c7ad612bc770317de2aeae https://github.com/kronosnet/kronosnet/commit/234ee608ab06abb482c7ad612bc770... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths: M libknet/tests/api_knet_get_crypto_cipher_list.c M libknet/tests/api_knet_get_crypto_hash_list.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c
Log Message: ----------- tests: add zero-initialization to knet_h arrays
Initialize all knet_h arrays with = {0} for consistency.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 58058d0ff57e563c19baf426094ef2d0d9dbcdca https://github.com/kronosnet/kronosnet/commit/58058d0ff57e563c19baf426094ef2... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths: M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_cipher_list.c M libknet/tests/api_knet_get_crypto_hash_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c
Log Message: ----------- tests: extend usage of FAIL_ON_ERR* macros across test suite
Replace manual error checking patterns with FAIL_ON_ERR* macros from test-common.h to improve consistency and reduce boilerplate.
Conversions include: - FAIL_ON_ERR: for tests with knet_h arrays requiring cleanup - FAIL_ON_ERR_NOCLEAN: for tests without knet_h arrays - FAIL_ON_SUCCESS: for negative testing with expected errno
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 5b04c66ddb48f0b7d650a2a738a4fd7cff9bd5d0 https://github.com/kronosnet/kronosnet/commit/5b04c66ddb48f0b7d650a2a738a4fd... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths: M libknet/tests/api_knet_host_set_name.c
Log Message: ----------- tests: remove redundant knet_host_remove call in api_knet_host_set_name
The manual knet_host_remove(knet_h1, 2) call is unnecessary since TEST_EXIT_CLEAN() will clean up all hosts via _ts_knet_handle_stop_everything().
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 3ea4ef00d92a65f29403fbb03dd86ec898efc12e https://github.com/kronosnet/kronosnet/commit/3ea4ef00d92a65f29403fbb03dd86e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-09 (Tue, 09 Jun 2026)
Changed paths: M libknet/transport_sctp.c
Log Message: ----------- libknet: fix SCTP reconnect thread race condition accessing reconnect_int
Coverity detected a MISSING_LOCK issue in the SCTP connect thread where knet_h->reconnect_int was accessed without holding global_rwlock after releasing it.
Fix by reading reconnect_int into a local variable while still holding the lock, then using that local copy for the usleep() call after releasing the lock.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 1a48c1cbe7b72c50b418458eaa8f70221d68d197 https://github.com/kronosnet/kronosnet/commit/1a48c1cbe7b72c50b418458eaa8f70... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-09 (Tue, 09 Jun 2026)
Changed paths: M libknet/tests/int_decompress_bufsize.c
Log Message: ----------- tests: fix int_decompress_bufsize build without zlib
Change #ifdef to #if WITH_COMPRESS_ZLIB > 0 and wrap helper functions to avoid unused function warnings when zlib is disabled.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 7f9411d3d0e6f04a64556b04a794b92a411f04f1 https://github.com/kronosnet/kronosnet/commit/7f9411d3d0e6f04a64556b04a794b9... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths: M libnozzle/libnozzle.c
Log Message: ----------- nozzle: Use portable type and macro for platform abstraction
Replace direct use of 'struct ifreq' with 'nozzle_ifreq' type and 'lib_cfg.ioctlfd' with 'NOZZLE_IOCTL_FD' macro. This improves portability across different BSD variants and Solaris where the ifreq structure may differ.
These macros are defined in libnozzle_bsd.c and other platform-specific files to abstract platform differences.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 4346d00d69869c8500c129b2eea6db9ca5a37658 https://github.com/kronosnet/kronosnet/commit/4346d00d69869c8500c129b2eea6db... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths: M libnozzle/libnozzle_bsd.c
Log Message: ----------- nozzle: Translate EEXIST to EBUSY on BSD for consistency
When creating a tap device on BSD, SIOCIFCREATE2 returns EEXIST if the device already exists. For consistency with Linux (which returns EBUSY in the same situation), translate EEXIST to EBUSY.
This allows tests and calling code to handle duplicate device creation uniformly across platforms.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 21c7fee6e003da6a03c729c3ed6f8d482d568a76 https://github.com/kronosnet/kronosnet/commit/21c7fee6e003da6a03c729c3ed6f8d... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths: M libnozzle/tests/api_nozzle_add_ip.c M libnozzle/tests/api_nozzle_close.c M libnozzle/tests/api_nozzle_del_ip.c M libnozzle/tests/api_nozzle_get_fd.c M libnozzle/tests/api_nozzle_get_handle_by_name.c M libnozzle/tests/api_nozzle_get_ips.c M libnozzle/tests/api_nozzle_get_mac.c M libnozzle/tests/api_nozzle_get_mtu.c M libnozzle/tests/api_nozzle_get_name_by_handle.c M libnozzle/tests/api_nozzle_open.c M libnozzle/tests/api_nozzle_run_updown.c M libnozzle/tests/api_nozzle_set_down.c M libnozzle/tests/api_nozzle_set_mac.c M libnozzle/tests/api_nozzle_set_mtu.c M libnozzle/tests/api_nozzle_set_up.c M libnozzle/tests/int_execute_bin_sh_command.c M libnozzle/tests/test-common.h
Log Message: ----------- nozzle: Introduce test macros similar to libknet
Add comprehensive test macros to test-common.h, similar to those used in libknet tests: - FAIL_ON_ERR: Fail if function returns error - FAIL_ON_SUCCESS: Negative test - expect failure with specific errno - FAIL_ON_NULL/FAIL_ON_NOT_NULL: For pointer-returning functions - FAIL_ON_NONZERO/FAIL_ON_ZERO: For comparisons - FAIL_ON_ERR_ONLY: For functions returning -1 on error - FAIL_ON_CMD: For execute_bin_sh_command and similar - FAIL_ON_CMD_SUCCESS: Negative test for commands
These macros: - Reduce code duplication and improve readability - Print descriptive failure messages with line numbers - Handle errno correctly for debugging - Automatically clean up via 'goto out_clean' pattern
All test files have been converted to use these macros, significantly reducing test code size (from 1280 to ~600 lines net) while improving clarity and error reporting.
Also fixed Solaris-specific test issues where interface state checks aren't possible - these now skip the check rather than fail.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 397e867422f8b8e0ec77eda6988ea1d3377cc7b3 https://github.com/kronosnet/kronosnet/commit/397e867422f8b8e0ec77eda6988ea1... Author: “xuxiaojuan1” xuxiaojuan@kylinos.cn Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths: M configure.ac M libknet/handle.c M libknet/threads_common.h M libknet/transport_sctp.c
Log Message: ----------- handle.c:Add unique names to handle threads
Commit: ec9c46d3d7b98e791b7d0ddc5b1abbc53ac289c3 https://github.com/kronosnet/kronosnet/commit/ec9c46d3d7b98e791b7d0ddc5b1abb... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-30 (Tue, 30 Jun 2026)
Changed paths: M .gitignore A CLAUDE.md M Makefile.am M README M configure.ac M kronosnet.spec.in M libknet/Makefile.am M libknet/crypto.c M libknet/crypto_nss.c M libknet/crypto_openssl.c M libknet/handle.c M libknet/handle_api.c M libknet/host.c M libknet/libknet.h M libknet/libknet_exported_syms M libknet/logging.c M libknet/tests/Makefile.am M libknet/tests/api-check.mk M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c A libknet/tests/api_knet_get_crypto_cipher_list.c A libknet/tests/api_knet_get_crypto_hash_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_id_by_name.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_get_transport_name_by_id.c M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_loglevel_name.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_get_subsystem_name.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c A libknet/tests/int_buffer_management.c A libknet/tests/int_decompress_bufsize.c A libknet/tests/int_defrag_edge_cases.c M libknet/tests/int_links_acl_ip.c A libknet/tests/int_seq_wraparound_stress.c M libknet/tests/int_timediff.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h M libknet/threads_common.c M libknet/threads_common.h M libknet/threads_pmtud.c M libknet/threads_rx.c M libknet/threads_tx.c M libknet/transport_common.c M libknet/transport_sctp.c A libknet/wireshark/Makefile.am A libknet/wireshark/packet-kronosnet.c A libknet/wireshark/packet-kronosnet.h M libnozzle/Makefile.am M libnozzle/internals.c M libnozzle/internals.h M libnozzle/libnozzle.c A libnozzle/libnozzle_bsd.c A libnozzle/libnozzle_linux.c A libnozzle/libnozzle_solaris.c M libnozzle/tests/Makefile.am M libnozzle/tests/api_nozzle_add_ip.c M libnozzle/tests/api_nozzle_close.c M libnozzle/tests/api_nozzle_del_ip.c M libnozzle/tests/api_nozzle_get_fd.c M libnozzle/tests/api_nozzle_get_handle_by_name.c M libnozzle/tests/api_nozzle_get_ips.c M libnozzle/tests/api_nozzle_get_mac.c M libnozzle/tests/api_nozzle_get_mtu.c M libnozzle/tests/api_nozzle_get_name_by_handle.c M libnozzle/tests/api_nozzle_open.c A libnozzle/tests/api_nozzle_prefix_validation.c M libnozzle/tests/api_nozzle_run_updown.c M libnozzle/tests/api_nozzle_set_down.c M libnozzle/tests/api_nozzle_set_mac.c M libnozzle/tests/api_nozzle_set_mtu.c M libnozzle/tests/api_nozzle_set_up.c M libnozzle/tests/int_execute_bin_sh_command.c M libnozzle/tests/test-common.h M man/Makefile.am
Log Message: ----------- Merge pull request #471 from kronosnet/stable1-proposed
stable1-proposed
Compare: https://github.com/kronosnet/kronosnet/compare/176bc1064a8e...ec9c46d3d7b9
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications