mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 05:10:25 +00:00
[ip6-address] add a type flag to addresses (#5019)
Add a origin flag to addresses so that applications are able to behave differently on the type of address (System, SLAAC, DHCPv6, Manual). Bumping OpenThread API version number. Signed-off-by: Markus Becker <markus.becker@tridonic.com>
This commit is contained in:
+5
-4
@@ -1556,10 +1556,11 @@ otError Interpreter::ProcessIpAddrAdd(uint8_t aArgsLength, char *aArgs[])
|
||||
VerifyOrExit(aArgsLength > 0, error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
SuccessOrExit(error = otIp6AddressFromString(aArgs[0], &aAddress.mAddress));
|
||||
aAddress.mPrefixLength = 64;
|
||||
aAddress.mPreferred = true;
|
||||
aAddress.mValid = true;
|
||||
error = otIp6AddUnicastAddress(mInstance, &aAddress);
|
||||
aAddress.mPrefixLength = 64;
|
||||
aAddress.mPreferred = true;
|
||||
aAddress.mValid = true;
|
||||
aAddress.mAddressOrigin = OT_ADDRESS_ORIGIN_MANUAL;
|
||||
error = otIp6AddUnicastAddress(mInstance, &aAddress);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user