mirror of
https://github.com/espressif/openthread.git
synced 2026-09-15 21:50:08 +00:00
This commit updates the default value of the POSIX configuration option `OPENTHREAD_POSIX_CONFIG_INSTALL_EXTERNAL_ROUTES_ENABLE` and the CMake option `OT_POSIX_INSTALL_EXTERNAL_ROUTES` from 1 (ON) to 0 (OFF). When enabled, the POSIX platform automatically installs external routes advertised in Thread Network Data (such as `fc00::/7` or `::/0` from peer Border Routers) directly into the host POSIX kernel routing table pointing to the `wpan0` interface. On Border Routers connected to an Adjacent Infrastructure Link (AIL / Ethernet / Wi-Fi), this behavior can lead to serious routing issues: - Routing loops and hairpinning: Traffic destined for external ULA or IPv6 destinations can match host kernel routes on `wpan0` and be forwarded across the low-bandwidth 802.15.4 Thread mesh to a peer BR, which forwards it right back onto the same Ethernet/Wi-Fi link. - Sub-optimal egress and mesh congestion: Outbound host or LAN traffic unnecessarily traverses the Thread mesh instead of using native high-speed infrastructure links, congesting the mesh. Thread devices on the mesh do not rely on POSIX host kernel routes, as they discover and route to external prefixes directly via Thread Network Data. Furthermore, reachability to on-mesh devices is handled separately via OMR route configuration (`INSTALL_OMR_ROUTES_ENABLE` / prefix route metrics). Installing external routes into the host kernel is only beneficial for standalone non-Border Router POSIX nodes without an alternate network uplink. Disabling this option by default prevents routing loops and unintended route injection on Border Routers. This commit also enables `OT_POSIX_INSTALL_EXTERNAL_ROUTES=ON` in the OTBR Docker test build (`script/test`) to preserve coverage for border router certification test cases that validate the optional feature.