Subject: [Patch] Inability to override search domains

[Patch] Inability to override search domains

From: David Drysdale <>
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
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 www')
 - The second fixes init_by_resolv_conf() so it only updates the domains if
they were missing at function entry.


Received on 2014-01-24