summaryrefslogtreecommitdiff
path: root/components/net
AgeCommit message (Collapse)Author
9 days[lwip] configure buffer options and preserve PBUF tailroomrcitach
9 days[DHCP] Optimize the DHCP startup logicrcitach
9 daysfix(netdev): correct ping delay logic for last packet and avoid ↵ymj0440
rt_thread_delay(0) The 'index == times' condition in the delay_tick calculation is never true, so the delay was still applied after the last ping, contrary to the comment. Skip the delay on the final ping by checking 'index != times - 1'. Also only call rt_thread_delay() when delay_tick > 0, since passing 0 returns -RT_EINVAL.
10 days[components][netdev] fix divide-by-zero in ping statistics when no replyZhaoqi Xu
netdev_cmd_ping() computed avg_time / received before checking that any reply arrived. When every request times out, received is 0 and the integer division traps (SIGFPE on the simulator, a fault on Cortex-M), taking the shell thread down. Only compute the average inside the existing received > 0 branch where it is printed. Fixes #11852
13 days[components][lwip] dhcpd: apply clang-format to dhcp_server.c陈谋顺
13 days[components][lwip] dhcpd: check buffer bounds when parsing options陈谋顺
The option loop advanced by the option length without checking the number of bytes actually received by recvfrom(), so a malformed or truncated DHCP packet could make the server read past the end of the receive buffer. Check that the option type, length and payload stay inside the received data before reading them, and stop parsing when a requested IP option is shorter than 4 bytes or a message type option is shorter than 1 byte. Fixes #11323
2026-10-03[lwip] fix sio_write signature conflictTim Wang
2026-10-03[lwip] clean lwip doc filesTim Wang
2026-10-03[lwip] add lwIP 2.2.1 as a selectable version alongside 1.4.1/2.0.3/2.1.2Tim Wang
- Kconfig: RT_USING_LWIP221 choice, RT_USING_LWIP_VER_NUM=0x20201 - SConscript for lwip-2.2.1 (acd.c, mdns split files, tftp.c) - replay RTT patch set from lwip-2.1.2 onto 2.2.1 - import RTT ping.c and tftp_port.c (adapted to 2.2.x TFTP API) - SAL: version-gated netconn socket accessor (callback_arg union >= 2.2.0) - lwipopts: DHCP ACD (RFC 5227) and MEMP_NUM_SYS_TIMEOUT version gates
2026-10-03[lwip] import pristine lwIP 2.2.1 source treeTim Wang
Verbatim upstream lwIP 2.2.1 official release (STABLE-2.2.1), complete with apps/, test/ and Filelists.
2026-09-21[net][at] Reject overlong numeric hostnameswyf-777
Numeric hostnames were copied into a fixed stack buffer without a length bound. Cache the length, reject values that cannot fit, and terminate the copy explicitly. Fixes #11332 Assisted-by: OpenAI Codex:GPT-5
2026-09-07[components][sal] Fix SIOCGIFCONF buffer overflowzhangyuyang
2026-09-01style: format code with clang-format [skip ci]wyf-777
2026-09-01[net][sal] Free DFS v2 vnode when socket creation failswyf-777
When sal_socket() rejects a request, DFS v2 descriptor cleanup destroys the dfs_file but leaves its separately allocated vnode behind. Destroy the vnode before releasing the failed descriptor and add a regression test that verifies repeated failures do not consume heap. Fixes #11710 Assisted-by: OpenAI Codex:GPT-5
2026-08-27fix(netdev): 修复无网卡时 ping 命令空指针崩溃zhangyuyang
netdev_cmd_ping 中 netdev 回退到 netdev_default 后未判空, QEMU 无网卡环境下执行 ping 直接解引用 NULL 崩溃(data abort)。 回退后增加空指针检查,提示无可用网卡并返回错误。
2026-08-17Add AF_UNIX sockets implementation (#11681)Bernard Xiong
* components/dfs: support unix socket nodes AF_UNIX pathname binding and descriptor passing require DFSv2 socket nodes and retained open file descriptions across fd tables. Add socket-node creation for tmpfs and devtmpfs, fd reference helpers, and socket F_SETFL forwarding. Impact: DFSv2 socket nodes and descriptor reference handling. Validation: git diff --cached --check. * components/net/sal: support local protocol providers Local IPC protocol families do not have a backing network device. Store the selected provider in each SAL socket and add a local provider registry while preserving netdev checks for Internet sockets. Handle DFSv2 close semantics, socketpair flags, and MSG_CTRUNC for AF_UNIX integration. Impact: SAL protocol dispatch for all socket families. Validation: git diff --cached --check. * components/lwp: support unix socket messages Musl AF_UNIX addresses and ancillary data require explicit ABI and user-memory conversion at the LWP syscall boundary. Add the musl msghdr layout, bounded address and message copying, control-message level conversion, and MSG_CTRUNC translation. Correct receive buffer allocation and copy lengths while handling messages. Impact: LWP socket syscalls when SAL is enabled. Validation: git diff --cached --check. * components/net/af_unix: add local sockets Add an opt-in AF_UNIX provider for pathname-based local IPC without a synthetic network device. Support datagram and stream sockets, blocking and nonblocking I/O, timeouts, poll, socketpair, and SCM_RIGHTS descriptor passing. Include bounded Kconfig settings, component documentation, and utest coverage. Impact: enabled only by RT_USING_AF_UNIX and requires SAL POSIX with DFSv2. Validation: git diff --cached --check. * Fix AF_UNIX CI checks Apply the repository clang-format rules to the affected source lines. Suppress the cppcheck false positive for the devtmpfs list iterator. No functional behavior is changed. * components/lwp: preserve NULL optional msghdr buffers When msg_name or msg_control is NULL, keep the kernel pointer NULL instead of substituting an uninitialized buffer. Reject a NULL control buffer with a nonzero length as EFAULT. Impact: LWP sendmsg/recvmsg conversion on MMU targets. Validation: git diff --cached --check. * components/net/af_unix: fix poll UAF, namespace leak, and SCM_RIGHTS cycles Poll only the local wait queue and wake writers from the receiver. Free namespace entries on detach, and reject AF_UNIX descriptors in SCM_RIGHTS until cycle collection exists. Impact: AF_UNIX poll, bind lifetime, and descriptor passing. Validation: git diff --cached --check. * components/dfs: add DFSv2 AF_UNIX utest suite Add opt-in tests under dfs/utest/v2/af_unix for socket nodes, IPC, poll peer-close, namespace cleanup, and SCM_RIGHTS rejection. Sources are built only when RT_UTEST_TC_USING_DFS_V2_AF_UNIX and the selected test groups are enabled. Impact: DFS utest menu and build; no production AF_UNIX behavior change. Validation: git diff --cached --check.
2026-08-12[lwip-dhcpd] Fix pbuf leak for oversized requestshanzhijian
2026-07-20net: lwip: fix mDNS test buffer fill sizeOld-Ding
Fill the mDNS domain name buffers with their array size instead of the size of the MDNS_DOMAIN_MAXLEN constant. This preserves the test intent of leaving different trailing bytes after equal names are encoded. Generated-by: OpenAI Codex Signed-off-by: Old-Ding <[email protected]>
2026-07-05lwip: fix trailing whitespace in TLS configOld-Ding
2026-07-05lwip: require TLS certificate verification when CA is configuredOld-Ding
2026-06-29lwip: constrain ping address resolution to IPv4Old-Ding
2026-05-25fix: V-001 security vulnerabilityorbisai0security
Automated security fix generated by Orbis Security AI
2026-05-24[lwip][ppp]: replace strncpy with rt_strncpyEvlers
2026-05-24[lwip][ppp]: fix the risk of name member contamination in the ppp netifEvlers
2026-05-20fix(lwip): fix build error with PPP enabled#11403Evlers
2026-04-01fix(at): clamp formatted output lengthAFWEF_147
2026-03-04[bsp][gd32]:gd32vw553h-eval add wifi support#11175CYFS
2026-02-05[components][lwip]: fix ping timeout handling and support ↵CYFS
LWIP_SO_SNDRCVTIMEO_NONSTANDARD
2025-11-21🐞 fix(at_socket):修复socket 在开启server下的connect连接蒙蒙plus
修复accept在错误执行过程中返回无效socket问题
2025-10-28[components]:utilize the clang-format-ignore mechanism (#10860)CYFS
2025-10-23feat:[sal][utest] added test cases for the sal api (#10720)Yuqiang Wang
* feat:[sal][utest] added test cases for the sal api * improve[net][utestcase]: standardize script construction * ci[auto utest run]: standardize naming and add sal testcases * add sal utest auto run configure and standard Information
2025-10-16utest: Improve the strings displayed in the menuChen Wang
Use "Test" instead of "Unit Testcases" to make string shorter. Use uppercase to make it look more eye-catching. Signed-off-by: Chen Wang <[email protected]>
2025-10-04format: format sal socket codeYuqiang Wang
2025-10-04feat:[sal][utest] added test cases for the sal apiYuqiang Wang
2025-09-26utest: remove RT_UTEST_USING_ALL_CASESChen Wang
Many modules' utests currently don't support enabling all tests at once. Furthermore, some modules' tests are complex, for example due to their numerous dependencies on other modules. This makes it nearly impossible to enable all tests with a single global switch. Consequently, the previously defined `RT_UTEST_USING_ALL_CASES` has lost its original meaning. We recommend deprecating this configuration switch. If a module needs to enable a group of functional tests through its own configuration, this local enable all switch should be implemented by the module itself, and a global RTT enable switch will no longer be provided. If such a requirement arises in the future, we recommend careful design, especially considering how to ensure that turning on a single switch enables all dependencies for all involved modules for ease of use. Signed-off-by: Chen Wang <[email protected]>
2025-09-18[utest][netdev]add netdev api testcases.Rbb666
2025-09-15[net/netdev]Fixed compilation errors when enabling IPv6 and IPv4 dual-stack ↵Rbb666
support.
2025-09-14[netdev]Fixed netdev_unregister missing correct return value. (#10693)R b b666
2025-09-10[utest][lwip]add lwip api testcase.Rbb666
2025-09-09[fix][ci]Fixed CI compilation failure in sal/src/sal_socket.cRbb666
2025-09-01fix: warnings generated by Kconfig.maosql
2025-08-21[component][net][at] at_client增加deInit接口 (#10598)RyanCW
* [component][net][at] at_client增加deInit接口 * [component][net][at] at_client优化serial_v2适配
2025-07-17fix #4286,fifx memory leak when sal_socket failedjianbaoshan
2025-07-10[refact](netdev): Expose netdev_set_dns and netdev_set_ifKinte
[Descriptions]: 1. Make these functions public to avoid code duplication and allow direct usage by other components. 2. Fix ifdef's error note. [Root Cause]:NA [Side Effects]:NA
2025-05-16[drivers][serial_v2]允许阻塞接收超过rx缓冲区大小的数据、增 ↵ryancw
加超时时间、flush、获取缓冲区数据长度命令、数据溢出逻辑修复、稳定性细节优化、添加更多serial_v2测试用例 [components][serial_v2] 优化txflush逻辑、对tx的activated做中断保护 [components][at] at_client适配新版serial_v2 [components][at] at_server适配新版serial_v2 [components][serial_v2] 测试用例增加循环调用,format测试用例 [components][serial_v2] poll模式判断逻辑错误 [components][serial_v2] 测试用例去掉一些非必要延时 [components][serial_v2] 测试例程使用menuconfig进行配置,更新readme [components][at_client] at_client_getchar返回值错误、at_client解析线程优先级错误设置 [components][at] 错误码应该返回负值 [components][serial_v2] TCFLSH和FIONREAD完善、control函数增加错误返回值 [components][serial_v2] RT_SERIAL_CTRL_GET_RX_DATA_LEN更改为RT_SERIAL_CTRL_GET_UNREAD_BYTES_COUNT [utest][serial_v2] TC_UART_SEND_TIMES替换为RT_SERIAL_TC_SEND_ITERATIONS [components][serial_v2] FIONREAD参数应该是无符号类型 [utest][serial_v2] 完善测试用例 [components][serial_v2] 避免使用三目运算符 [components][serial_v2] 使用clang-format格式化代码 [components][serial_v2] 添加get超时时间命令 [components][serial_v2] 完善posix接口 [components][serial_v2] 阻塞接口添加阻塞时间为0时的处理逻辑、优化RX阻塞接收逻辑 [components][serial_v2] 设置超时时间命令的参数改为指针形式 [components][serial_v2] nbuf发送添加超时时间为0时的逻辑 [components][serial_v2] 完善添加测试用例 [utest][serial_v2] 修复依赖关系 [components][serial_v2] 非阻塞模式下tx_flush错误修复 [components][serial_v2] activated使用原子API [components][serial_v2] 优化DMA逻辑、没使能DMA时屏蔽DMA逻辑节约资源 [components][serial_v2] 提供写满时丢弃新数据和覆盖旧数据策略,写满丢弃策略效率更高 [components][serial_v2] 部分平台适配写满时两种策略功能 [components][serial_v2] DMA模式暂不支持丢弃新数据策略 [utest][serial_v2] 优化测试代码 [components][serial_v2] DMA模式下使用乒乓缓冲、DMA模式支持丢弃新数据策略 [utest][serial_v2] 适配DMA乒乓缓冲 [bsp][serial_v2] 部分bsp适配DMA下乒乓缓冲 [components][serial_v2] 使用spinlock替换中断,对部分结构体变量使用原子操作 [utest][serial_v2] 更新测试用例 [components][at] 适配new serialv2不再判断RTT版本号 [components][at] 删除多余的中文注释 [utest][serial_v2] 添加交叉echo示例,qemu环境下专用 [bsp][qemu] 适配串口v2并开启fifo [components][at] 修复合并导致的错误 [bsp][n32] 适配serial_v2,没有经过测试 [components][serial_v2] 格式化代码 [utest][serial_v2] 删除无意义的打印
2025-03-12[components][at] Add formatting message function for at client1078249029
It will be useful for quiting transmission mode of some chips like esp8266. Signed-off-by: 1078249029 <[email protected]>
2025-01-20[components][netdev] add statistics and more inupt parameters to ping commandEvlers
2025-01-03[AT] AT_Device 适配 SERIAL_V2 (#9860)dongly
AT_Device 适配 SERIAL_V2
2024-12-25add support for independent dns services for multiple network devicesEvlers
2024-11-27[sscanf] use rt_sscanf to replace sscanfMeco Man