Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8
-
None
-
-
252bd7c67 (dev), 10fea78bd (dev), 40986460e (dev), 41768db30 (dev), fb69c5a35 (6.8), 5ce4677f2 (6.8), ea871ee2e (6.8), c2df419ed (6.8)
Description
QDnsLookup doesn't seem to plumb to the DNS machinery on macOS/iOS, but is instead implemented via the unix APIs.
This means we're missing out on /etc/hosts lookup and Bonjour/mDNS, and don't reflect the complete DNS setup on Apple systems.
As an example,
❯ dscacheutil -q host -a name localhost. name: localhost ipv6_address: ::1name: localhost ip_address: 127.0.0.1
dscacheutil uses the system DNS machinery.
❯ nslookup localhost. Server: 1.1.1.1 Address: 1.1.1.1#53** server can't find localhost: NXDOMAIN
❯ dig localhost.; <<>> DiG 9.10.6 <<>> localhost. ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 45886 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;localhost. IN A;; AUTHORITY SECTION: . 85342 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2024092500 1800 900 604800 86400;; Query time: 7 msec ;; SERVER: 1.1.1.1#53(1.1.1.1) ;; WHEN: Wed Sep 25 16:47:48 CEST 2024 ;; MSG SIZE rcvd: 113
While nslookup (and dig) does not.
For Qt, the tst_QDnsLookup::lookupLocalhost() test fails in a similar way, unless the upstream DNS server happens to resolve "localhost."
Attachments
Issue Links
- resulted in
-
QTBUG-129349 Re-enable tst_qhostinfo on macOS
- Closed
For Gerrit Dashboard: QTBUG-129335 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
594007,2 | tst_QDnsLookup: Don't assume DNS servers work in a non-CI environment | dev | qt/qtbase | Status: ABANDONED | -1 | +1 |
594359,3 | tst_QDnsLookup: don't require "localhost" to resolve | dev | qt/qtbase | Status: MERGED | +2 | 0 |
594364,6 | tst_QDnsLookup: check for DNS server sanity | dev | qt/qtbase | Status: MERGED | +2 | 0 |
594365,4 | tst_QDnsLookup: add the ability to specify an alternate default server | dev | qt/qtbase | Status: MERGED | +2 | 0 |
594591,2 | tst_QDnsLookup::lookupReuse(): Rewrite using lookupCommon helper | dev | qt/qtbase | Status: MERGED | +2 | 0 |
595091,2 | tst_QDnsLookup: don't require "localhost" to resolve | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
595094,2 | tst_QDnsLookup: check for DNS server sanity | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
595096,2 | tst_QDnsLookup: add the ability to specify an alternate default server | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
595099,2 | tst_QDnsLookup::lookupReuse(): Rewrite using lookupCommon helper | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |