[ds6-devel] privoxy, how to prevent much unusable AAAA DNS queries

Dr. Peter Bieringer pb at bieringer.de
Fri Jun 6 15:47:25 CEST 2003


Hi,

first thanks for the IPv6 patch for privoxy, working here very well now 
(will publish an adjusted spec file soon).

But I have a question:

How can I prevent privoxy from doing so much unusable AAAA queries?

Preface:
Host running privoxy has an /etc/resolv.conf with 3 search domains 
specified.
On each new host request, privoxy tries to resolv (example here):

AAAA www.domain.tld. -> NXDOMAIN
AAAA www.domain.tld.searchdom1. -> NXDOMAIN
AAAA www.domain.tld.searchdom2. -> NXDOMAIN
AAAA www.domain.tld.searchdom3. -> NXDOMAIN
A www.domain.tld. -> IPv4 address

same happen on using telnet, but only on
 telnet www.domain.tld 80
not on
 telnet www.domain.tld. 80

It's sure a glibc resolver issue (here used: 2.2.5 / RHL 7.3), but would it 
be possible to add a config switch to privoxy for "only resolve fqdn". But 
I have too less knowledge how to implement this in a proper manner.

related function is imho in "jbsockets.c"

addr_list *resolve_hostname_to_ip(const char *host, const char *port, int 
pf)
{

...

   result = getaddrinfo(host, port, &hints, &res0);

Does it help to check, whether "host" is not an IPv4 or an IPv6 address 
(how) and append a "." at the end (by copy into a new char* - don't forget 
to check max size - 1....).

	Peter
-- 
Dr. Peter Bieringer                     http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D               mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member  http://www.deepspace6.net/


More information about the ds6-devel mailing list