mirror of
https://github.com/espressif/openthread.git
synced 2026-08-17 07:59:51 +00:00
[slaac] simplify adding/removing addresses and other enhancements (#9579)
This commit makes the following smaller enhancements in `Slaac` class: - Adds a new `ShouldUseForSlaac()` method to check if a network data prefix should be used for SLAAC, checking flags and applying the filter if set. - Introduces separate `RemoveAddresses()` and `AddAddresses()` methods to manage SLAAC addresses, replacing the previous `Update()` method. - Adds helper methods to `RemoveAllAddresses()`, `RemoveAddress()` to remove a specific address, and `AddAddressFor(prefix)` to generate and add an address for a given prefix. - Simplifies `GenerateIid()` by removing unused input parameters.
This commit is contained in:
@@ -146,7 +146,7 @@ Error DuaManager::GenerateDomainUnicastAddressIid(void)
|
||||
Error error;
|
||||
uint8_t dadCounter = mDadCounter;
|
||||
|
||||
if ((error = Get<Utils::Slaac>().GenerateIid(mDomainUnicastAddress, nullptr, 0, &dadCounter)) == kErrorNone)
|
||||
if ((error = Get<Utils::Slaac>().GenerateIid(mDomainUnicastAddress, dadCounter)) == kErrorNone)
|
||||
{
|
||||
if (dadCounter != mDadCounter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user