krb1.5 plugin interface query

Danny Mayer mayer at
Sun Sep 10 00:23:39 EDT 2006

Ken Raeburn wrote:
> Actually, Sam and I had an idea for a use for the KDC location plugin  
> interface: You could use it for experimenting with new code to do the  
> config-file or DNS lookups in different ways.  Either for your own  
> private use, without affecting other users, or as a way of testing  
> code you might like to integrate into your source tree and/or submit  
> to us, but without having to rebuild the whole tree for every change.
> For example: Our code for using DNS SRV records doesn't look at the  
> "additional data" fields of the response, which may contain the  
> network addresses of the hosts listed, so you don't have to make  
> additional queries.  (A question I haven't investigated: Does the  
> presence of an A record there and no AAAA records mean there is no  
> AAAA record, or would you still need to make that query?  My guess  
> would be the latter.)

There is no guarantee that the contents of the additional data section
are complete. Most of this depends on how your resolver library
implements this. If you follow up with a call to getaddrinfo() you will
get IPv6 addresses first in the list if there are any, but there is no
way to be sure what you get from an SRV request.


> And depending on your environment, if the address queries are needed,  
> it may be more efficient to find a way to fire off multiple requests  
> to the DNS server and then collect the results as they come in (but  
> you may not want to lose the /etc/hosts check).
> Ken

More information about the krbdev mailing list