Miernik <[EMAIL PROTECTED]> writes:
> Currently I think WWWOFFLE makes AAAA DNS requests even if it doesn't
> bind to any IPv6 addresses, and there a no IPv6 addresses on the system
> at all. These AAAA queries are completely useless, just waste a bit of
> time. At least could there be an option in the config file not to make
> any AAAA DNS queries? As on a system without IPv^ connectivity (as most
> systems are), it could't use the result anyway even if it got a response
> from the DNS server (in most cases it doesn't). On systems with long RTT
> to the Internet (think satellite connection), superflous DNS queries
> generate significant delays.
The type of queries that are made depend on whether the IPv6 option
was enabled at compile time or not.
There is an option to getaddrinfo (the library function that actually
gets the address) which can take an option flag called AI_ADDRCONFIG
that might help. The manual page for this option says:
If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4
addresses are returned in the list pointed to by result only if
the local system has at least one IPv4 address configured, and
IPv6 addresses are only returned if the local system has at
least one IPv6 address configured.
Would setting this be enough for you? Do you have any IPv6 addresses
configured on your system (I don't know what it checks for)?
The patch that you would need is the following (which also fixes a
trivial, non-error causing, spelling mistake in the original).
-------------------- sockets6.c patch --------------------
--- sockets6.c 2005/10/15 18:00:58 1.19
+++ sockets6.c 2007/06/04 18:14:56
@@ -479,7 +479,7 @@
struct sigaction action;
hints.ai_flags=ai_flags;
- hints.ai_family=PF_UNSPEC;
+ hints.ai_family=AF_UNSPEC|AI_ADDRCONFIG;
hints.ai_socktype=SOCK_STREAM;
hints.ai_protocol=0;
hints.ai_addrlen=0;
-------------------- sockets6.c patch --------------------
If you really are on the end of a very slow (or long RTT) link then
you should consider running a local DNS server or proxy. I can
recommend pdnsd which I have been using for a long time now. This can
be configured to ignore IPv6 requests which seems to be what you want
here. It would also fix any other IPv6 aware programs that you use
even if you don't know that you are using them.
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.9/user.html