summaryrefslogtreecommitdiff
path: root/addons/BSD
AgeCommit message (Collapse)Author
2026-05-29Added BSD recvfromto support (#376)mzgrebnak
* recvfromto support * nx_bsd_inet_aton, disabling other format than four numbers separated by dots. Otherwise used in nx_bsd_inet_pton It accepts unallowed format of IP address. * bsd: address PR review feedback - Fix build failure: add missing nx_bsd_recvfromto() prototype to nxd_bsd.h near the other receive prototypes. The nx_bsd_recvfromto macro maps to recvfromto, but without a prior declaration the compiler emits -Werror=missing-declarations. - Revert inet_aton() change: restore the 1-part, 2-part and 3-part abbreviated IPv4 address formats (a.b.c and a.b). The PR removed them, breaking existing tests that rely on these forms. - Add IPv6 destination address support in recvfromto(): when the receiving BSD socket is AF_INET6, extract the destination IPv6 address from the IPv6 packet header and populate a sockaddr_in6 in toAddr, mirroring the existing IPv4 path. - Add regression test netx_bsd_recvfromto_test covering: * recvfromto() populates fromAddr (sender) and toAddr (destination) with correct address/port values for IPv4 UDP * recvfromto() with NULL toAddr/toAddrLen works like recvfrom() * inet_aton() still accepts abbreviated a.b and a.b.c forms Register test in regression/CMakeLists.txt. --------- Co-authored-by: Frédéric Desbiens <[email protected]> Co-authored-by: Copilot <[email protected]>
2026-05-29Implemented BSD select improvements (#375)mzgrebnak
* initial support * bsd: address PR review feedback - Fix accept() regression: preserve accepted socket FD even when recreating the secondary listen socket fails due to slot exhaustion. Set secondary_socket_id = NX_BSD_MAX_SOCKETS to invalidate the slot for future accept() calls, but still return the already-accepted FD. - Restore select() writefds 'not in use' case: closed/unallocated descriptors must be reported immediately as writable per BSD semantics. Several tests (netx_bsd_tcp_basic_blocking_test, _rcvbuf_test, _getaddrinfo_test) depend on this behaviour. - Fix select() exceptfds race with readfds: the readfds scan calls nx_tcp_socket_receive() which dequeues the head packet; a subsequent peek at nx_tcp_socket_receive_queue_head in the exceptfds scan then finds NULL. Move the URG/push-flag check into the readfds scan immediately after the successful dequeue while the packet is still accessible. - Add regression test netx_bsd_select_improvements_test covering: * zero-timeout select clears all fdsets without blocking * normal TCP data sets readfds, not exceptfds * a not-in-use descriptor appears in writefds Register test in regression/CMakeLists.txt. --------- Co-authored-by: Frédéric Desbiens <[email protected]> Co-authored-by: Copilot <[email protected]>
2026-05-28Implemented BSD socket options improvements (#374)mzgrebnak
● - 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 (< 0 or > 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 [email protected] Co-authored-by: Copilot [email protected]
2026-03-07Updated copyright headers and version strings. Removed version historyFrédéric Desbiens
2026-03-06Added regression test and enhanced select fix for Issue #366Frédéric Desbiens
2026-02-20fix: #366 Refactor `select()` socket suspend structuresElliott
Refactored `select()` and `nx_bsd_select_wakeup()` to differentiate between requested event filter `nx_bsd_fd_set` and resulting active sockets `nx_bsd_fd_set`. This prevents spurious events being raised for sockets that are not part of the wakeup triggers.
2025-03-18Updated version numbers to 6.4.3Frédéric Desbiens
2024-01-29Update copyright.Bo Chen (from Dev Box)
2023-12-28Updated version and date for 6.4.0 (#229)v6.4.0_relBo Chen
2023-12-27Fix compile warnings in BSD.Yanwu Cai
2023-12-27Add TSN support.Tiejun Zhou
0f2cc4bfa Support TSN in NetX Duo
2023-10-23Update on 23 Oct 2023. Expand to see details.v6.3.0_relTiejun Zhou
002a5890e Generated rtxp demo in netxduo/samples folder. c09d9da51 Add function header in .h for RTP and RTSP f5a96f35b Update function header and version for 6.3.0 0ff7a6809 Correct dhcpv6 server for ignoring lifetime fields in client request 9a2129c35 Fixed dhcpv6 server not update client record issue e59d2b5f1 Fix dhcp coverage test compile wanrning d00655d71 Fix infinite loop issue in TCP & UDP free port find function c194c74ca Optimize rtp_sender and fix pipeline reported issues b6df8dea0 Add RTxP feature 38e57e633 Added test case for _nx_snmp_utility_object_id_get(). 321c88bd9 Added check for pdu length. 36ffb7c39 Fixed packet double release. 92166d736 Fixed SNMP test cases for v4_small_build 67f071552 Improved buffer length verification for padding. 30cc5d8b2 Fix wait option used in FTP test case 098a97213 Avoid duplicate packet release when DTLS send fails 15313e868 Improved buffer length verification for _nx_snmp_utility_object_id_set(). ecd3904d3 Fixed MSRC 81018 caa004007 Fix the logic of handling close notify packet from peer 2b8c87685 Removed main.c into netxduo/samples folder, then all addons can use it. c72c66cdc Fixed MSARC 81019 and MSRC 81079 8169be7a6 Fixed MSRC81005 and MSRC81020 41389b76b Fixed packet double release issue in _nx_ftp_client_file_write 19348e408 Combined the functions of processing snmp v1 and v2. 9174b6457 Fixed icmpv6 ra buffer overwrite test case. 6bdc703d9 Fixed packet double release issue in _nx_nat_process_packet 403ecd128 Set nx_smtp_server_packet to NULL to avoided duplicate packet release in _nx_smtp_utility_read_server_code af5dd00c6 Disable FTP server MSS test case when packet chain is disabled beadbce12 Enable weekly pipeline build to avoid CodeQL expiration 5a3d88f97 Fixed MSRC 81528 df6a1fc57 unify the code. 18c13bfdb Fixed MSRC 80745. 2cce43f48 Fixed bug in utility/iperf/nx_iperf.c pointer used before set its value. 2477fb81c Update product owners 2f5734ada Fixed MSRC 80686 34e713e26 Fixed data length underflow when TCP MSS is less than 255 7097a7859 Improved the test cases for packet chain. 1ffa13cfa Fixed MSRC 80685 97e2b8d8e Set packet pointer to NULL after released to fix duplicate packet release issue c1e47efa7 Fix ICMPv6 NS buffer overwrite issue. c2770ea68 Add ICMPv6 NA buffer overwrite test case. 36bb05f85 Validated TCP header buffer to avoid span in multiple packets 84070bb2a Correct the length of packet buffer to avoid write overflow 5b3b3a10b Dropped packet chain for SNTP data to avoid write overflow 82699872d Onebranch build Image Update: Move pipelines to supported and compliant OneBranch container images a30171f93 Add a test case to demonstrate IGMP override caused by IP assembly. 72472ff4b Fix MSRC 80746 5d9f1266a Corrected the acked packet count when out of order is enabled b113ebdc9 Fixed DHCP server local variable type issue b70863299 Enable codeql in onebranch pipeline
2023-06-30Update on 30 Jun 2023. Expand to see details.Tiejun Zhou
06cb10f01 Fix typo in NetXDuo Crypto 996dd14fc BSD functions overriding option 3b756c219 Fix mqtt interoperability issue when upgrade to ubuntu 20.04 01ca51021 Added support for skipping failed step 3e3a15e79 Add record length checking in nxe_secure_tls_session_send. ec617d178 Fix demo_netx_secure_tls test link issue under nightly build a934cb718 Fix pipeline libgcc issue in nx_secure_interoperability test f08024578 Fix illegal access when NXD_MQTT_OVER_WEBSOCKET enabled 9798e2b89 Corrected the mDNS symbols check 456007dd1 Fixed multiple proxy update issue cf0bf15b5 Add TLS sample demo_netx_secure_tls.c. 87ea505bf Add sha256 in driver preprocess command for ADU 7e1b9686a Add pnp check for ADU ef78d336d Improved the code to ignore null file url.
2023-03-31Update on 31 Mar 2023. Expand to see details.Tiejun Zhou
d91a02534 Add adu agent install unit test. b6819d250 Support random IP id 19c78054f Corrected the include order for IoT Security module.
2023-03-08Release 6.2.1 on 08 Mar 2023. Expand to see details.v6.2.1_relTiejun Zhou
29eee6fe8 Update function header and version to 6.2.1 e22a02169 Fix compile errors in TLS 3e0a14c1c Fix network driver for regression test. 442f3adfa Fix compiler warnings in NetXDuo
2023-02-27Update on 27 Feb 2023. Expand to see details.Tiejun Zhou
1c87864dc [SNTP & TELNET] Clear the client ID in delete function for SNTP and TELNET. 1a957bf48 Reported ADU agent state as IDLE to server after receiving cancel command. d648902b2 [BSD] Corrected the result of FIONREAD when using TCP socket. 494f0016f create netxduo cmsis-pack c5519bdf8 Add ADU version string f52279c97 Include TLS port header in nx_secure_x509.h cf753549b Fix packet leak in TLS 1.3 be8943659 Update PnP interface to use ADU GA model 17e601544 Fix the logic to cleanup key material 11e65bacd Initialize metadata for certificate using packet buffer 7ff1841ac Fix conditional build check for TLS 1.3
2022-07-26Release 6.1.12v6.1.12_relYuxin Zhou
2022-01-26Release 6.1.10v6.1.10_relYuxin Zhou
2021-10-13Release 6.1.9v6.1.9_relYuxin Zhou
2021-06-02Release 6.1.7v6.1.7_relBo Chen
2021-02-28Release 6.1.5Yuxin Zhou
2020-10-096.1 ReleaseScott Larson
2020-05-14Moved protocol handlers to addonsPProvost