Repository navigation
[dhcp] fix unbounded client allocation on pool exhaustion - #11947
usualtreee wants to merge 4 commits into
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: @Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-11-03 10:36 CST)
📝 Review Instructions
|
|
Suppress the intentional old-lwIP #error for Cppcheck and keep the directive at column zero for clang-format.
为什么提交这份PR (why to submit this PR)
Refs: #11878
raw API DHCP 服务器的 dhcp_client_alloc() 在候选地址已占用时通过 goto 继续搜索,但没有限制搜索次数。地址池全部占用后,新 MAC 的 DISCOVER 会使该函数在 lwIP 接收路径中永久循环,后续网络报文无法处理。
本 PR 只处理地址池耗尽后的无界搜索,不加入租约到期或地址回收机制。
你的解决方案是什么 (what is your solution)
仅修改 components/net/lwip-dhcpd/dhcp_server_raw.c。
请提供验证的bsp和config (provide the config and bsp)
验证结果:
尚未进行实板及全部架构验证;租约到期回收不在本 PR 范围内。