[rbldnsd] AAAA Queries?

Michael Tokarev mjt at tls.msk.ru
Fri Jul 28 21:25:35 MSD 2006


Victor Duchovni wrote:
> On Fri, Jul 28, 2006 at 09:42:26AM -0400, Bri Bruns wrote:
> 
>> Here's whats going on, and its very simple.  On machines with IPv6 
>> enabled and functioning, for example, a Linux box, the resolver queries 
>> go by default AAAA lookup, then a normal A lookup.  I can't remember 
>> why - I think it has something to do with an IPv6 related RFC, where 
>> IPv6 is supposed to be tried first before IPv4 unless the resolver 
>> library is explicitly told to do so otherwise.
> 
> True for getaddrinfo(), but RBL lookups are not usually made from the
> C-library getaddrinfo() routine. Rather RBL aware software makes
> explicit DNS "T_A" lookups. If somebody writes broken RBL lookup
> software that uses getaddrinfo() they need to be sent off for
> "re-education"...

Well.  This stuff isn't this simple.
It's trivial to write

  if (getaddrinfo(sprintf(..., ipaddr, dnsbl))) {
     ...
  }

but it's *far* more complex to write a DNS client, even
this simple one (I know because I did ;)

So "re-education" isn't quite a right word here.  More,
that getaddrinfo() version works, works right away (yes,
it's still not complete, because we don't have TXT records).

Ditto for perl code for the same task.  gethostbyname() is
here in standard install, but DNS-related things are huge
slow monsters with difficult-to-use interface.

/mjt


More information about the rbldnsd mailing list