Subject: Resolving names without dns-suffix on windows

Resolving names without dns-suffix on windows

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

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