Closed Bug 1518208 Opened 6 years ago Closed 6 years ago

localhost is resolved by trr (dns-over-https) in mode 3

Categories

(Core :: Networking: DNS, defect, P3)

66 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: im, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged][trr])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

In about:config, set
network.trr.mode;3
network.trr.uri;https://dns.google.com/experimental
(maybe not related to doh host but it is what i'm using while testing).

Browse http://localhost/

Actual results:

Firefox will try to resolve localhost with trr, and fails
This is my log https://pastebin.com/kugqmcrL while first part is network.trr.mode;3 and second with network.trr.mode;2.

Expected results:

According to https://bugzilla.mozilla.org/show_bug.cgi?id=1434852

"localhost" and names in the ".local" TLD will never be
resolved via DOH.

Summary: localhost is resolved by trr (dns-over-https) → localhost is resolved by trr (dns-over-https) in mode 3
Component: Untriaged → Networking: DNS
Product: Firefox → Core

Thanks a lot for the report. It's not clear to me from the logs if it actually attempts to resolve localhost using TRR, or if resolving localhost just fails due to a bug (at first look I suspect it's this).

Assignee: nobody → valentin.gosu
Blocks: 1434852
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Whiteboard: [necko-triaged][trr]

The doh request is indeed sent to doh server. I set up a doh-proxy in localhost and tried again. Both localhost and dev.local is sent to doh server.

Firefox nsReslover log: https://pastebin.com/0d1b527E

doh-proxy log: https://pastebin.com/2CyL2vDj

My config under network.trr:

network.trr.allow-rfc1918;true
network.trr.blacklist-duration;60
network.trr.bootstrapAddress;108.177.125.113
network.trr.confirmationNS;example.com
network.trr.credentials;
network.trr.custom_uri;https://dns.google.com/experimental
network.trr.disable-ECS;false
network.trr.early-AAAA;true
network.trr.max-fails;5
network.trr.mode;3
network.trr.request-timeout;1500
network.trr.uri;https://dns.google.com/experimental
network.trr.useGET;false
network.trr.wait-for-portal;true

Normally you wouldn't want localhost or *.local domain to be resolved by a
remote resolver.
This patch makes sure that even if we are in TRR-only mode, we still
successfully resolve the domains specified by network.trr.excluded-domains
using native DNS.

Also fixes bug in TRRService::ReadPrefs where we didn't clear mExcludedDomains
before reading the pref.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7eaec898c17e Respect network.trr.excluded-domains in TRR-only mode r=dragana
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1534046
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: