mirror of
https://github.com/espressif/openthread.git
synced 2026-08-26 20:19:53 +00:00
[dns-client] enhance logic for following up with IPv4 address query (#10781)
This commit updates the `ReplaceWithIp4Query()` method, which determines whether an unsuccessful IPv6 address query should be followed up with an IPv4 query. The logic is changed as follows: - If the response code to the IPv6 query indicates success but the answer section is empty (meaning the name exists but has no IPv6 address), or the response code indicates an error other than `NameError`, the query is replaced with an IPv4 address resolution query for the same name. - If the server responds with `NameError` (RCode=3), indicating that the name doesn't exist, an IPv4 query is not attempted. This replaces the previous behavior where a follow-up query was attempted for any error response code.
This commit is contained in:
@@ -1696,6 +1696,7 @@ void TestProxyTimeout(void)
|
||||
|
||||
config.Clear();
|
||||
config.mResponseTimeout = 120 * 1000; // 2 minutes (in msec)
|
||||
config.mNat64Mode = OT_DNS_NAT64_DISALLOW;
|
||||
dnsClient->SetDefaultConfig(config);
|
||||
|
||||
Log("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
|
||||
|
||||
Reference in New Issue
Block a user