Branch: refs/heads/misc-bugfixes Home: https://github.com/kronosnet/kronosnet Commit: 0fd40f5c370fe588bb0ff13d4f77b2945bbbfccb https://github.com/kronosnet/kronosnet/commit/0fd40f5c370fe588bb0ff13d4f77b2... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-31 (Sun, 31 May 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: 5793958e7eb4a15ecb8a1593160a1a17f9521d5c https://github.com/kronosnet/kronosnet/commit/5793958e7eb4a15ecb8a1593160a1a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-31 (Sun, 31 May 2026)
Changed paths: M libknet/tests/api_knet_recv.c M libknet/threads_rx.c M libknet/threads_tx.c
Log Message: ----------- libknet: fix knet_recv buffer size validation for KNET_DATAFD_FLAG_RX_RETURN_INFO
When KNET_DATAFD_FLAG_RX_RETURN_INFO is set, knet sends both the knet_datafd_header (16 bytes) and packet data (up to 65536 bytes) via writev(), totaling 65552 bytes. This exceeds KNET_MAX_PACKET_SIZE.
Move buffer validation after channel setup so we can check the flag, and validate based on whether RX_RETURN_INFO is enabled: - Without flag: buffer must not exceed KNET_MAX_PACKET_SIZE - With flag: buffer must not exceed KNET_MAX_PACKET_SIZE + sizeof(header)
Update api_knet_recv test to use correct buffer sizes based on the flag and replace manual retry loop with wait_for_packet() helper.
Add Coverity suppression in threads_tx.c for sockfd flags access that is protected by global_rwlock held by calling thread.
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/8a297a4c83e7...5793958e7eb4
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications