chiark / gitweb /
Support IPv6 PTR lookups.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 5 May 2014 10:27:54 +0000 (11:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 May 2014 13:32:26 +0000 (14:32 +0100)
commit8a53cf7f63a4decacd4b293b32167a23cdeea412
treeb73a460ef06aaebaafde1b4abccca799d4d1d178
parent4e8966f30fe4b53960581503c29677ec41f589ed
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>
client/adh-query.c
client/adnshost.h
src/addrfam.c
src/internal.h
src/query.c
src/types.c