<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netxduo.git/test/regression/bsd_test/netx_bsd_socket_options_test.c, branch dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/netxduo.git/atom/test/regression/bsd_test/netx_bsd_socket_options_test.c?h=dev</id>
<link rel='self' href='http://cgit.235523.xyz/netxduo.git/atom/test/regression/bsd_test/netx_bsd_socket_options_test.c?h=dev'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/netxduo.git/'/>
<updated>2026-05-28T20:23:22Z</updated>
<entry>
<title>Implemented BSD socket options improvements (#374)</title>
<updated>2026-05-28T20:23:22Z</updated>
<author>
<name>mzgrebnak</name>
<email>michal.zgrebnak@rockwellautomation.com</email>
</author>
<published>2026-05-28T20:23:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/netxduo.git/commit/?id=57410350d94bbcb5e6885d0fbc40c72b6d7ddd33'/>
<id>urn:sha1:57410350d94bbcb5e6885d0fbc40c72b6d7ddd33</id>
<content type='text'>
●  - initial support
   - bsd: address PR review feedback
   - Fix build failure: so_linger was stored on NX_TCP_SOCKET which has
   no such field. Linger state is now kept in NX_BSD_SOCKET using the
   new nx_bsd_option_linger field and the existing
   NX_BSD_SOCKET_ENABLE_OPTION_LINGER flag.
   - Fix sign-conversion warning in setsockopt(IP_TOS): read the value
   as INT, validate range 0..0xFF, then cast to ULONG.
   - Reject out-of-range INT values (&lt; 0 or &gt; 255) in
   setsockopt(IP_TTL).
   - Add lower-bound check for IPPROTO_IP options in getsockopt and
   setsockopt so that SO_* option numbers are no longer silently
   accepted at the IPPROTO_IP level.
   - Add null check for raw sockets in IP_TOS and IP_TTL get/set paths;
   return ENOPROTOOPT instead of dereferencing a NULL pointer.
   - Validate
    *option_length before writing in SO_BROADCAST, TCP_NODELAY,
   SO_LINGER and IP_TOS getsockopt paths; set
    *option_length to the
   actual size returned on success.
   - Separate ENOPROTOOPT (wrong socket type) from EINVAL (wrong length)
   in SO_LINGER get/set error handling.
   - Remove unused so_linger local variable from getsockopt.
   - Replace C++-style // comments in the close/linger path with C99
   /*
    */ comments.
   - Add regression test netx_bsd_socket_options_test covering SO_LINGER,
   IP_TOS, IP_TTL, SO_BROADCAST and TCP_NODELAY round-trips and error
   paths; register in bsd_test_cases in regression/CMakeLists.txt.

  Co-authored-by: Frédéric Desbiens frederic.desbiens@eclipse-foundation.org
  Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com</content>
</entry>
</feed>
