mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 06:17:47 +00:00
[dns-client] check all responses in GetHostAddress() (#9044)
This commit fixes an issue with `ServiceResponse::GetHostAddress()` method. The issue only occurs when separate queries (e.g., for SRV and TXT records) are used, and therefore separate `Response` objects are collected and chained together as a linked list. The change ensures that we check every response in the list when getting host addresses.
This commit is contained in:
@@ -639,7 +639,7 @@ Error Client::ServiceResponse::GetHostAddress(const char *aHostName,
|
||||
|
||||
for (const Response *response = this; response != nullptr; response = response->mNext)
|
||||
{
|
||||
error = FindHostAddress(kAdditionalDataSection, Name(aHostName), aIndex, aAddress, aTtl);
|
||||
error = response->FindHostAddress(kAdditionalDataSection, Name(aHostName), aIndex, aAddress, aTtl);
|
||||
|
||||
if (error == kErrorNone)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user