Branch: refs/heads/libnozzle-fixes Home: https://github.com/kronosnet/kronosnet Commit: 8c1dc621fb2c5ac334de0a32c4a66d9949d1edc6 https://github.com/kronosnet/kronosnet/commit/8c1dc621fb2c5ac334de0a32c4a66d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-14 (Thu, 14 May 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: 2ce260930cd76874cc4edb2dd1fa549c6cb4808e https://github.com/kronosnet/kronosnet/commit/2ce260930cd76874cc4edb2dd1fa54... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-14 (Thu, 14 May 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: 13b31f2261e6352264b30b125d4c60489885132f https://github.com/kronosnet/kronosnet/commit/13b31f2261e6352264b30b125d4c60... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-14 (Thu, 14 May 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
Compare: https://github.com/kronosnet/kronosnet/compare/f41905179dac...13b31f2261e6
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications