[ds6-devel] privoxy, how to prevent much unusable AAAA DNS
queries
Lionel Elie Mamane
lionel at mamane.lu
Fri Jun 6 17:45:01 CEST 2003
On Fri, Jun 06, 2003 at 02:47:25PM +0200, Dr. Peter Bieringer wrote:
> first thanks for the IPv6 patch for privoxy, working here very well
> now
You are welcome.
> 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
This is true for privoxy, too:
master at tofu:~/src/privoxy/privoxy/src$ telnet localhost 8118
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET http://foo.bar.com./ HTTP/1.0
and a tcpdump says:
16:31:49.710383 tofu.mamane.lu.35492 > quorn.mamane.lu.domain: [udp sum ok] 49133+ AAAA? foo.bar.com. (29) (len 37, hlim 64)
16:31:49.711657 tofu.mamane.lu.35492 > quorn.mamane.lu.domain: [udp sum ok] 49134+ A? foo.bar.com. (29) (len 37, hlim 64)
> It's sure a glibc resolver issue (here used: 2.2.5 / RHL 7.3),
Exactly.
> but would it be possible to add a config switch to privoxy for "only
> resolve fqdn".
I don't think the getaddrinfo() interface permits to express this
wish. So it is not possible, unless you delve into the DNS protocol
(possibly with a library) and do the requests yourself. I don't think
it is worth it.
> related function is imho in "jbsockets.c"
> addr_list *resolve_hostname_to_ip(const char *host, const char *port, int
> pf)
Yes, indeed.
> Does it help to check, whether "host" is not an IPv4 or an IPv6
> address (how) and append a "." at the end
Pff... Try to parse it (evil), or feed it to getaddrinfo with the
AI_NUMERICHOST set. If that fails, add the "." and try again without
the flag.
But I don't think it is worth it. I don't see why these extra requests
are a problem in the first place, and implementing work-arounds in
every and each program is the wrong way to "fix" it. Fix getaddrinfo.
--
Lionel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://lists.deepspace6.net/pipermail/ds6-devel/attachments/20030606/072fbd8e/attachment.bin
More information about the ds6-devel
mailing list