Subject: Re: Resolving names without dns-suffix on windows

Re: Resolving names without dns-suffix on windows

From: Maxim Ruban <m.ruban_at_drweb.com>
Date: Wed, 19 Jun 2013 21:20:42 +0400

Hello once again,

Sorry for confusing you - I've missed HAVE_GETHOSTNAME flag when
compiling c-ares,
and untrue when saying "gethostname returns name without suffix".

Problem solved, getting domains from GetAdaptersAddresses is not necessary.

Kind regards,
Maxim.

On 2013-06-19 8:08 PM, Maxim Ruban wrote:
> Hello all,
>
> I am unable to resolve short names w/o dns-suffix specified:
> "shortname.corp.com" is OK, but "shortname" is failed to resolve.
>
> Domain list is not provided to c-ares, so by default it tries to init
> domains list from LOCALDOMAIN environment variable,
> or get domain from current host name (gethostname).
>
> In my case host name returned by gethostname does not contain dns-suffix.
>
> I think, it would be good on windows platform to initialize domains
> list with results of GetAdaptersAddresses call (DnsSuffix field in
> IP_ADAPTER_ADDRESSES structure)
> if no domains were deduced from LOCALDOMAIN or gethostname.
>
> Please, let me know your opinion on this subject.
>
> Kind regards,
> Maxim.
>
>
Received on 2013-06-19