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: Tue, 25 Jun 2013 20:03:08 +0400

Patch is in attach (pl. let me know if something wrong with it - I've
made it by TortoiseCVS on Windows, and don't know if it's compatible
with Unix-family tools).

Please, review it and improve if neccessary.

Patch creates unique list of dns-suffixes from registry as I stated
earlier, and relies on information from the article
http://technet.microsoft.com/en-us/library/dd197418%28v=ws.10%29.aspx
(Section "SearchList" )

On 2013-06-25 4:13 PM, Maxim Ruban wrote:
> On 2013-06-24 10:00 PM, René Berber wrote:
>> On 6/19/2013 11:08 AM, Maxim Ruban wrote:
>>
>>> 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.
>>
>> A long time ago I proposed a patch to solve a similar problem, I
>> don't remember what happened but my patch is not used.
>>
>> I been using the patch and it works fine, perhaps it solves the
>> problem you are seeing. The patch just changes the order in which
>> the domain is discovered.
>>
>> I don't know if the list allows attachments, let's try attaching it,
>> if that doesn't work, I'll put it in a message.
> Rene, thanks, "+ config_domain(channel, fi->DomainName);" solves this
> issue.
>
> I will impove mechanism to work with multiple interfaces and multiple
> domains.
>
> As per investigations (if my understanding correct), Windows first
> looks at SearchList to find possible suffixes.
> This list have higher priority over other search options and specified
> manually by administator.
> http://support.microsoft.com/kb/275553/en-us?fr=1
>
> If name was not resolved, it looks into Domain and DhcpDomain
> specified in
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters
> (Domain has priority over DhcpDomain
> http://technet.microsoft.com/en-us/library/cc962456.aspx)
>
> If name still not resolved it enumerates interfaces
> (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces)
> and looks for Domain and DhcpDomain there.
>
> So, I am planning to create list of domains based on all options above
> (from registry).
>
> I refused to use GAA function for this purposes since
> IP_ADAPTER_DNS_SUFFIX field was introduced in Windows SDK 7.0 and it
> is hard to use it without hacks.
>

Received on 2013-06-25