Subject: Re: Using relative names

Re: Using relative names

From: Dima Tisnek <dimaqq_at_gmail.com>
Date: Thu, 24 May 2012 21:58:22 +0300

I worked around this by not specifying "search" or "domain" in
/etc/resolv.conf on linux for glibc and c-ares resolvers and
specifying "." (dot) as dns suffix on win for win32 resolver, sorry
didn't test c-ares on win.
dnsmask works as caching dns proxy on lan and is configured to resolve
domain-less names locally.

in a way relative names *are* handled in c-ares: if domain or search
is specified in resolv.conf; you are right though that it seems you
can't specify a list of domains that includes both a domain and empty.

d.

On 24 May 2012 20:45, René Berber <rene.berber_at_gmail.com> wrote:
> Hi,
>
> After using c-ares' library in an application I see that relative names
> (names without the domain part) are not handled.
>
> Relative names are converted into full names appending the value of domain
> (/etc/resolv.conf), also known as "DNS Suffix" (Windows).
>
> Is there a current way to enable handling relative names?
>
> To give an example, host vs. ahost, the former handles relative names and
> has option:
>
> "The -N option sets the number of dots that have to be in name for it to be
> considered absolute. The default value is that defined using the ndots
> statement in /etc/resolv.conf, or 1 if no ndots statement is present. Names
> with fewer dots are interpreted as relative names and will be searched for
> in the domains listed in the search or domain directive in
> /etc/resolv.conf."
>
> The later doesn't handle relative names.
> --
> René Berber
>
Received on 2012-05-24