mirror of
https://github.com/espressif/openthread.git
synced 2026-09-16 14:10:09 +00:00
[address-resolver] fix ADDR_NTF.ans to use Child's Mesh Local IID (#4898)
This commit is contained in:
@@ -816,13 +816,8 @@ void AddressResolver::HandleAddressQuery(Coap::Message &aMessage, const Ip6::Mes
|
||||
|
||||
if (child.HasIp6Address(target))
|
||||
{
|
||||
Mac::ExtAddress addr;
|
||||
|
||||
// Convert extended address to IID.
|
||||
addr = child.GetExtAddress();
|
||||
addr.ToggleLocal();
|
||||
lastTransactionTime = TimerMilli::GetNow() - child.GetLastHeard();
|
||||
SendAddressQueryResponse(target, addr.m8, &lastTransactionTime, aMessageInfo.GetPeerAddr());
|
||||
SendAddressQueryResponse(target, child.GetMeshLocalIid(), &lastTransactionTime, aMessageInfo.GetPeerAddr());
|
||||
ExitNow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,6 +584,14 @@ public:
|
||||
*/
|
||||
otError GetMeshLocalIp6Address(Ip6::Address &aAddress) const;
|
||||
|
||||
/**
|
||||
* This method returns a pointer to the Mesh Local Interface Identifier.
|
||||
*
|
||||
* @returns a pointer to the Mesh Local Interface Identifier.
|
||||
*
|
||||
*/
|
||||
const uint8_t *GetMeshLocalIid(void) const { return mMeshLocalIid; }
|
||||
|
||||
/**
|
||||
* This method gets the next IPv6 address in the list.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user