[address-resolver] fix ADDR_NTF.ans to use Child's Mesh Local IID (#4898)

This commit is contained in:
Rongli Sun
2020-04-27 18:27:14 -07:00
committed by GitHub
parent 83d73fc9f2
commit 5c7c147ff2
2 changed files with 9 additions and 6 deletions
+1 -6
View File
@@ -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();
}
}
+8
View File
@@ -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.
*