mirror of
https://github.com/espressif/openthread.git
synced 2026-08-29 13:29:54 +00:00
[net-diags] set the sock addr based on dest in GetQuery response (#7593)
This commit updates how the `MessageInfo` for a "GetQuery" response is prepared so that we use link-local source if the destination of response is also using link-local.
This commit is contained in:
@@ -494,7 +494,7 @@ void NetworkDiagnostic::HandleDiagnosticGetQuery(Coap::Message &aMessage, const
|
||||
SuccessOrExit(error = message->SetPayloadMarker());
|
||||
}
|
||||
|
||||
if (aMessageInfo.GetSockAddr().IsLinkLocal() || aMessageInfo.GetSockAddr().IsLinkLocalMulticast())
|
||||
if (aMessageInfo.GetPeerAddr().IsLinkLocal())
|
||||
{
|
||||
messageInfo.SetSockAddr(Get<Mle::MleRouter>().GetLinkLocalAddress());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user