Branch: refs/heads/misc-bugfixes Home: https://github.com/kronosnet/kronosnet Commit: 98c97c75f1e4b36707b373a00b44e78afa0d261b https://github.com/kronosnet/kronosnet/commit/98c97c75f1e4b36707b373a00b44e7... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths: M libknet/tests/int_defrag_edge_cases.c
Log Message: ----------- [tests] skip Test 8 zero-payload fragments on FreeBSD/OpenIndiana
FreeBSD and OpenIndiana/illumos SEQPACKET socketpair implementations do not deliver zero-byte messages even when marked with MSG_EOR.
Root cause: BSD's uipc_soreceive_stream_or_seqpacket() checks sb->sb_acc < sb->sb_lowat before checking the M_EOR flag. For 0-byte messages, sb->sb_acc=0 and sb->sb_lowat=1 (default), causing it to return EWOULDBLOCK without ever delivering the message.
Linux SEQPACKET uses datagram semantics (unix_dgram_recvmsg) which correctly delivers 0-byte messages.
The knet defragmentation code handles zero-payload fragments correctly on all platforms. This is purely a BSD kernel socketpair limitation.
Test 8 validates defensive programming against packet injection attacks or corrupted packets. Skipping it on BSD platforms does not indicate a knet bug.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications