mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
290919b178
The test `test_1_3_DBR_TC_7A` was failing occasionally due to uninitialized stack memory in `NetworkData::OnMeshPrefixConfig config`. Because `OnMeshPrefixConfig` inherits from `otBorderRouterConfig` and does not automatically initialize its fields in its default constructor, declaring `NetworkData::OnMeshPrefixConfig config;` on the stack left its members (including `mDp` and `mNdDns` flags) with arbitrary stack garbage. If `mDp` (Domain Prefix flag) evaluated to true, it caused the registered `PRE_1` prefix to be erroneously processed as a Domain Prefix. Consequently, the border router did not include `PRE_1` as a Route Information Option (RIO) in its emitted Router Advertisements, causing packet verification to fail in Step 4. This commit fixes the issue by explicitly initializing the `config` struct using `config.Clear()` right after declaration.