QDnsLookup/Windows: don't append domain search suffixes

The Unix code doesn't do that.

[ChangeLog][Important Behavior Changes] QDnsLookup on Windows will no
longer append the system's configured domain name for look ups that
contained only a single label (that is, no dots). This matches the Unix
behavior.

Change-Id: I5f7f427ded124479baa6fffd175f69e537cf9ca2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Thiago Macieira 2023-05-15 13:06:58 -07:00
parent eb51454b90
commit 365af87f94

View File

@ -60,7 +60,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
request.Version = 1;
request.QueryName = reinterpret_cast<const wchar_t *>(requestNameUtf16.constData());
request.QueryType = requestType;
request.QueryOptions = DNS_QUERY_STANDARD;
request.QueryOptions = DNS_QUERY_STANDARD | DNS_QUERY_TREAT_AS_FQDN;
if (!nameserver.isNull()) {
memset(dnsAddresses, 0, sizeof(dnsAddresses));