mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 09:10:04 +00:00
[routing-manager] simplify PdPrefixManager::HasPrefix() (#11242)
This commit simplifies `PdPrefixManager::HasPrefix()` by simply checking if `mPrefix` is empty (rather than `IsValidOmrPrefix()`). A favored PD prefix is always validated before it is assigned to `mPrefix`, and when the prefix is removed, `mPrefix` is cleared.
This commit is contained in:
@@ -1474,7 +1474,7 @@ private:
|
||||
void Start(void) { StartStop(/* aStart= */ true); }
|
||||
void Stop(void) { StartStop(/* aStart= */ false); }
|
||||
bool IsRunning(void) const { return GetState() == kDhcp6PdStateRunning; }
|
||||
bool HasPrefix(void) const { return IsValidOmrPrefix(mPrefix.GetPrefix()); }
|
||||
bool HasPrefix(void) const { return !mPrefix.IsEmpty(); }
|
||||
const Ip6::Prefix &GetPrefix(void) const { return mPrefix.GetPrefix(); }
|
||||
State GetState(void) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user