[dhcp6-client] return error if Identity Association is not found (#5782)

This commit is contained in:
Jonathan Hui
2020-11-07 19:45:04 -08:00
committed by GitHub
parent cc89e0eb20
commit 753089865b
+4 -2
View File
@@ -559,7 +559,7 @@ exit:
otError Client::ProcessIaAddress(Message &aMessage, uint16_t aOffset)
{
otError error = OT_ERROR_NONE;
otError error;
IaAddress option;
SuccessOrExit(error = aMessage.Read(aOffset, option));
@@ -583,10 +583,12 @@ otError Client::ProcessIaAddress(Message &aMessage, uint16_t aOffset)
idAssociation.mNetifAddress.mValid = option.GetValidLifetime() != 0;
idAssociation.mStatus = kIaStatusSolicitReplied;
Get<ThreadNetif>().AddUnicastAddress(idAssociation.mNetifAddress);
break;
ExitNow(error = OT_ERROR_NONE);
}
}
error = OT_ERROR_NOT_FOUND;
exit:
return error;
}