Draft #2: Re: [PATCH] SAMBA_3_0 : remove ldap_domain2hostlist()
Gerald (Jerry) Carter
jerry at samba.org
Thu May 4 22:14:06 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
> "Gerald (Jerry) Carter" <jerry at samba.org> writes:
>> Here's a short patch to replace the OpenLDAP ldap_domain2hostlist()
>> calls with a small internal dns query. The next step would be
>> to refactor the ads_dns_query_dcs() code to a generic DNS SRV
>> query function.
> You need to read up on RFC 2782 how to sort the dns srv
> rr entries.
> Also, you need to make the request space larger. I don't
> know how large your NS_PACKETSZ is, probably 512 which
> is the udp packet size, but it wont be large enough for
> the TCP with 100 DC's case (I'm not kidding, people do
I still need to fix the sorting and parsing of the
authority section (all the SRV replies I've seen so far have
0 authority records which is why I've ignored it for now).
This version is
(a) standalone (gcc -o dnstest dns_rr_srv.c -lresolve)
(b) handles retries when a larger buffer is required
(c) refactors the query and parsing code to be more generic
(d) pulls out the A records in the additional section
if the name matches
$ ./dnstest books.plainjoe.org
ads_dns_query_dcs: 1 records returned in the answer section.
bzr repo at
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10527 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060504/836d193b/dns_rr_srv.bin
More information about the samba-technical