Draft #2: Re: [PATCH] SAMBA_3_0 : remove ldap_domain2hostlist()

Love Hörnquist Åstrand lha at kth.se
Sat May 6 06:15:38 GMT 2006


"Gerald (Jerry) Carter" <jerry at samba.org> writes:

> Love Hörnquist Åstrand wrote:
>
>> I looked at the code with qsort, yes. 
>> 
>> If you have two entries, will both of the get selected with appropriate
>> distribution ? With your correct code, I don't think so.
>> 
>> priority=1,weight=2
>> priority=1,weight=1
>
> The list is ordered such that the caller will use entries in the front
> of the list first.  So from your example, the order would be:
> {p=1,w=2} {p=1,w=1}.  This is the best we can do with how the
> current SAMBA_3_0 code makes use of IP lists to select domain
> controllers.

But according to rfc2782 the list should be randomized using weight for the
distribution, so on average the distribution should be like this:

{p=1,w=2} {p=1,w=1} 2/3
{p=1,w=1} {p=1,w=2} 1/3

Read the rfc2782/The format of the SRV RR/Weight again and cry. Easiset
wayt to deal with with it is to implement the algorithm specfied in the
rfc.

Love

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 823 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060506/2107f9c9/attachment.bin


More information about the samba-technical mailing list