[posix] fix misleading log message in DNS resolver (#11545)

The log message "No domain name servers found in %s, default to
127.0.0.1" is misleading because the code does not actually default to
127.0.0.1 if no nameservers are found.

This commit updates the log message to accurately reflect the
behavior.
This commit is contained in:
Yang Song
2025-06-02 15:22:17 -07:00
committed by GitHub
parent eb8a926037
commit 7fb682f928
+1 -1
View File
@@ -143,7 +143,7 @@ void Resolver::LoadDnsServerListFromConf(void)
if (mUpstreamDnsServerCount == 0)
{
LogCrit("No domain name servers found in %s, default to 127.0.0.1", kResolvConfFullPath);
LogCrit("No domain name servers found in %s", kResolvConfFullPath);
}
mUpstreamDnsServerListFreshness = otPlatTimeGet();