From 0f7e8491e2c2445331d5febcbe3a24c0c1d4e1e3 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 3 Jul 2023 05:52:11 -0700 Subject: [PATCH] [routing-manager] `PdPrefixManager` to clear prefix bits when extending length (#9249) This commit updates the `RoutingManager::PdPrefixManager::Process()` method to `Tidy()` the prefix before setting the prefix length and potentially extending the prefix to `kOmrPrefixLength` (64 bits). This ensures that extended bits in the prefix are set to zero. --- src/core/border_router/routing_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index e061fb37c..599fb58ef 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -3317,8 +3317,8 @@ Error RoutingManager::PdPrefixManager::Process(const Ip6::Nd::RouterAdvertMessag continue; } - entry.mPrefix.SetLength(kOmrPrefixLength); entry.mPrefix.Tidy(); + entry.mPrefix.SetLength(kOmrPrefixLength); // The platform may send another RA message to announce that the current prefix we are using is no longer // preferred or no longer valid.