chiark / gitweb /
Support IPv6 PTR lookups.
* Support parsing of reversed IPv6 addresses, so as to check the
forward address against the result of the reverse lookup.
* Support reversing AF_INET6 socket addresses in adns_submit_reverse.
* Parse IPv6 literal addresses in adnshost `-i' arguments and pass
them on.
A side effect of this work is that PTR lookups now issue adns_r_a or
adns_r_aaaa child queries, as opposed to adns_a_addr queries. I found
that this made things simpler -- especially as we don't have adns_r_addr
support for IPv6 yet.
Knowledge about the reverse-lookup zones is not kept in addrfam. I want
to leave open the possibility of direct support for the obsolete
`ip6.int' zone, and other similar wrinkles. This knowledge has moved
from adns_submit_reverse to adns_submit_reverse_any, which also needs
to find the appropriate name-reversal algorithm, and it seemed sensible
to keep them together. The magical `default_zone' token used to pass on
this responsibility is a little grim.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>