New issue
Advanced search Search tips

Issue 883969 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

AsyncDNS resolver should correctly determine canonicalized hostname.

Project Member Reported by asanka@chromium.org, Sep 13

Issue description


  www.foo.example.       1000    IN     CNAME   host.foo.example.
  host.foo.example.      1000    IN     A       10.10.10.10

The default host resolver correctly determines the canonical hostname as `host.foo.example` while the `AsyncDns` resolver returns `www.foo.example`.

 
Labels: Postmortem-Followup
Owner: asanka@chromium.org
Status: Assigned (was: Untriaged)
Cc: ericorth@chromium.org
[+ericorth]:  Just FYI
Labels: -Pri-3 Target-72 Pri-1
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4

commit 2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4
Author: Asanka Herath <asanka@chromium.org>
Date: Wed Oct 24 14:35:55 2018

[net/dns] Return correct CNAME from AsyncDNS resolver.

While AsyncDNS resolver is perfectly capable of following a CNAME chain,
it doesn't return the owner name for an address record. This field is
important for callers of the resolver who expected the returned
AddressList to contain the correct canonical name.

This CL fixes the issue by plumbing the name into the AddressList.
I.e. assume we have the following RRs:

  www.foo.example.       1000    IN     CNAME   host.foo.example.
  host.foo.example.      1000    IN     A       10.10.10.10

The canonical name for www.foo.example is host.foo.example since that's
the owner name for the A record. Prior to this CL the AsyncDNS resolver
would return www.foo.example. After the CL it returns host.foo.example.

Bug:  883969 
Change-Id: I8a44f68e2dbbb1726467fde0c65c1d4e9ee304d4
Reviewed-on: https://chromium-review.googlesource.com/c/1292435
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602330}
[modify] https://crrev.com/2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4/net/dns/dns_test_util.cc
[modify] https://crrev.com/2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4/net/dns/dns_test_util.h
[modify] https://crrev.com/2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4/net/dns/host_resolver_impl.cc
[modify] https://crrev.com/2d0226c95b825b36848ae50b4bdb0fa9b1e35dc4/net/dns/host_resolver_impl_unittest.cc

Status: Fixed (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f186bcf25f2321ae65ccb56e18ea2f18410d7df1

commit f186bcf25f2321ae65ccb56e18ea2f18410d7df1
Author: Asanka Herath <asanka@chromium.org>
Date: Wed Oct 24 21:23:43 2018

[net/dns] Allow routing requests with CANONNAME flag to AsyncDns

Prior to 2d0226c9 the AsyncDns resolver didn't return the correct
canonical name for an address. To work around that limitation,
HostResolverImpl routed any request with the CANONNAME flag to the
system host resolver.

Now that AsyncDns resolver returns the correct canonicalized name, it
can once again start servicing requests that have the CANONNAME flag.

Bug:  883969 
Change-Id: I009ae1b22f4d9a78bb3a905158d2686283626350
Reviewed-on: https://chromium-review.googlesource.com/c/1298175
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602455}
[modify] https://crrev.com/f186bcf25f2321ae65ccb56e18ea2f18410d7df1/net/dns/host_resolver_impl.cc
[modify] https://crrev.com/f186bcf25f2321ae65ccb56e18ea2f18410d7df1/net/dns/host_resolver_impl_unittest.cc

Sign in to add a comment