[dns-client] fix handling of IPv4 resolve failure (#10766)

This commit fixes an issue in `Client::ReplaceWithIp4Query()` where an
IPv6 address resolution query failure could lead to an incorrect IPv4
query being sent. The incorrect query type was being checked in this
method, causing `ResolveIp4Address()` to keep sending queries.
This commit is contained in:
Abtin Keshavarzian
2024-09-30 09:09:54 -07:00
committed by Jonathan Hui
parent a6d607370c
commit 4c45ee8e0e
+1 -1
View File
@@ -1563,7 +1563,7 @@ Error Client::ReplaceWithIp4Query(Query &aQuery)
info.ReadFrom(aQuery);
VerifyOrExit(info.mQueryType == kIp4AddressQuery);
VerifyOrExit(info.mQueryType == kIp6AddressQuery);
VerifyOrExit(info.mConfig.GetNat64Mode() == QueryConfig::kNat64Allow);
// We send a new query for IPv4 address resolution