[PATCH] libads: Fix fallback logic when finding a domain controller

Jeremy Allison jra at samba.org
Tue Jun 9 15:23:47 MDT 2015


On Tue, Jun 09, 2015 at 10:19:13PM +0300, Uri Simchoni wrote:
> Oops once again with the patch...
> 
> On Tue, Jun 9, 2015 at 10:18 PM, Uri Simchoni <urisimchoni at gmail.com> wrote:
> > This is a patch to fix bug 11321.
> >
> > Basically when finding a domain controller, the method is to resolve
> > the IP address of candidate servers, and then do an ldap ping until a
> > suitable server answers.
> >
> > In case of failure, there's fallback from DNS lookup to netbios lookup
> > (if netbios is enabled) and then back to site-less DNS lookup. The two
> > problems here are:
> > 1. It makes more sense to try site-less DNS before NetBIOS because the
> > fallback to NetBIOS is not likely to give better results.
> > 2. The NetBIOS fallback screws the site-less fallback (I suppose the
> > "goto considered harmful fellows are sometimes right after all...).
> >
> > This fix extracts the core code that does name resolving+ldap ping
> > into a separate function and then activates this function in up to
> > three modes - site-aware, site-less, and netbios, in that order.

Ooh. That sounds clever ! I'll take a look tomorrow (busy with
other stuff right now, sorry).


More information about the samba-technical mailing list