Subject: [Patch] Inability to override search domains

[Patch] Inability to override search domains

From: David Drysdale <drysdale_at_google.com>
Date: Fri, 24 Jan 2014 15:38:37 +0000

Hi Daniel,

I don't think it's currently possible to explicitly set the search domains
for c-ares -- any values specified in ares_options get overwritten by the
values from /etc/resolv.conf. Looking back through the history, this seems
to be a side effect of the change in commit
125b1a8619eb27<https://github.com/bagder/c-ares/commit/125b1a8619eb27>,
which fixed an earlier problem where the first domain/search entry in
/etc/resolv.conf was used rather than the last.

I've attached a couple of potential patches below:
 - The first adds a "-s domain" option to ahost to allow a search domain to
be specified, to allow the problem to be exhibited (e.g with './ahost -s
icann.org. www')
 - The second fixes init_by_resolv_conf() so it only updates the domains if
they were missing at function entry.

Regards,
David

=========================
Received on 2014-01-24