summaryrefslogtreecommitdiff
path: root/addons
AgeCommit message (Collapse)Author
2026-06-03Merge commit from forkFrédéric Desbiens
Co-authored-by: Yuxin Zhou <[email protected]>
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-05-28Ftp server: implemented lcall to ogout callback on client timeout for ↵Valentin Batz
consistency (#372) ftp server: call logout callback on client timeout for consistency Otherwise this is not symmetric with the other case where logout is also called when the client disconnects. Refactor performing the logout into a separate helper to avoid duplication. Fix security bug: stale authenticated flag after inactivity timeout. Moving nx_ftp_client_request_authenticated = NX_FALSE into the _nx_ftp_server_logout_client helper ensures every call site (QUIT, disconnect, and now timeout) consistently resets auth state. Before this fix, a new TCP connection accepted on a timed-out socket slot could issue commands without USER/PASS. Remove the now-redundant per-callsite authenticated resets in the QUIT handler and the control-disconnect processing path. Fix AUTHOR field in _nx_ftp_server_logout_client (was 'TBD'). Remove trailing whitespace from the new function comment block and from the blank line following the QUIT logout call. Add regression test netx_ftp_server_activity_timeout_test that forces the inactivity timer to fire, asserts the logout callback is invoked, uses a raw TCP connection to verify commands are rejected with 530 before USER/PASS (demonstrating the auth-reset fix), and confirms a fresh authenticated session works normally. 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-10-06Added missing bearer and bearer_legth referencesFrédéric Desbiens
2025-10-06Added missing parameters in _client_connect callsFrédéric Desbiens
2025-10-06Fixed issues with websocket changes and updated tests (#345)Frédéric Desbiens
* Restored ECC_CIPHERSUITE ifdef code. * Remove unused variables. * Replaced faulty comparisons with ifdefs. * Fixed regression tests.
2025-10-06Fixed compilation error per issue #344Frédéric Desbiens
2025-09-29Fixed _nx_websocket_client_connect_internal declaration.Frédéric Desbiens
2025-09-29Fixed typo in updated _nx_websocket_client_connect declaration.Frédéric Desbiens
2025-09-29Fixed _nxe_websocket_client_connect declaration.Frédéric Desbiens
2025-09-29Fixed _nxe_websocket_client_connect declaration.Frédéric Desbiens
2025-09-29Merge pull request #313 from mdkf/devFrédéric Desbiens
#312 Handle HTTP code 429
2025-09-29Merge commit from forkFrédéric Desbiens
Insert a buffer_ptr position check before getting bytes
2025-09-29Merge commit from forkFrédéric Desbiens
Insert a index position check before getting bytes
2025-09-29Merge commit from forkFrédéric Desbiens
Added buffer length check
2025-09-29Merge commit from forkFrédéric Desbiens
Insert a remaining buffer length check before dereferencing the pointer
2025-06-19websocket client: Add support for Authorization Bearer headerJoel Guittet
The Authorization: Bearer header allow to perform authentication providing a token. It is optional. Signed-off-by: Joel Guittet <[email protected]>
2025-06-19websocket client: Sec-WebSocket-Protocol is optional headerJoel Guittet
The header Sec-WebSocket-Protocol is optional in both the request and the response from the server. Signed-off-by: Joel Guittet <[email protected]>
2025-05-27patch for GHSA-v474-mv4g-v8cxcypherbridge
edited by inspection not compiled or run-time tested
2025-05-20Insert a buffer_ptr position check before getting bytesekleezg
2025-05-20Insert a index position check before getting bytesekleezg
2025-05-20Insert a remaining buffer length check before dereferencing the pointerekleezg
2025-04-07typoMichael Fowler
2025-04-02312 Handle HTTP code 429Michael DK Fowler
2025-03-18Updated version numbers to 6.4.3Frédéric Desbiens
2025-03-04Port HTTP server fixes from web module to internal moduleHuan Nguyen
2025-02-14update usage _nx_web_http_server_response_send cypherbridge
change content length error responses for underflow and other conditions from NX_WEB_HTTP_STATUS_INTERNAL_ERROR to NX_WEB_HTTP_STATUS_BAD_REQUEST. Obfuscate additional information message to eliminate 'Underflow' to defend adversary protocol fuzzing discovery
2025-02-11Remove unnecessary commentsHuan Nguyen
Signed-off-by: Frédéric Desbiens <[email protected]>
2025-02-11Forbid empty packets in TLS sending, remove debug prints and commented notesHuan Nguyen
Signed-off-by: Frédéric Desbiens <[email protected]>
2025-02-11Add debugging prints and commented notesHuan Nguyen
Signed-off-by: Frédéric Desbiens <[email protected]>
2025-02-11Improve file closing in HTTP server PUT processingHuan Nguyen
Signed-off-by: Frédéric Desbiens <[email protected]>
2025-02-11Detect underflow in put_process length calculationshnguyenHWI
Signed-off-by: Frédéric Desbiens <[email protected]>
2025-02-11Close file in cases of errorhnguyenHWI
Signed-off-by: Frédéric Desbiens <[email protected]>
2024-01-29Update copyright.Bo Chen (from Dev Box)
2024-01-11Update README.mdEric Wolz
2023-12-28Updated version and date for 6.4.0 (#229)v6.4.0_relBo Chen
2023-12-28Updated readme for defender. (#228)Bo Chen
2023-12-28Removed IoT Security Module. (#227)Bo Chen
2023-12-27Convert C++ comment style to C.TiejunZhou
2023-12-27Fix compile warnings in BSD.Yanwu Cai
2023-12-27Add TSN support.Tiejun Zhou
0f2cc4bfa Support TSN in NetX Duo
2023-12-04Added telemetry callback for tracking puback. (#214)Bo Chen
2023-11-30Remove lwm2m files.Bo Chen
2023-11-27Add netxduo regression test.Wenhui Xie
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