chiark / gitweb /
src/types.c, regress/: Use checklabel hook to parse PTR query domains.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 1 Jun 2014 20:50:59 +0000 (21:50 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 13 Jun 2014 08:57:41 +0000 (09:57 +0100)
commit40206a7e3b0418aaceec200ba2df8fabbb511cc6
tree85c9d0d7aec407ba8d82ed65ae88a0d62c48b934
parentf6fe6b8d26ef7cb9fcca0d9b245ce11414b416fd
src/types.c, regress/: Use checklabel hook to parse PTR query domains.

A PTR with forward-lookup checking needs to parse the original question
into an address, so as to have something to compare the results of the
forward queries against.  Previously this was done in pa_ptr, when the
first PTR answer came in.  But parsing can fail, and is a simple
syntactic computation on the input domain name, so it seems rather
unfortunate to delay checking the name until an answer has come in.  Now
that we have the checklabel hook, then, we might as well use it here.
(Indeed, this is in fact the reason for introducing it.)

Unfortunately, this check now rejects a number of queries early, which
previously would have resulted in a query and maybe a NODATA or NXDOMAIN
answer, but in exactly the way we just rigged all of the test cases.  So
we remove the temporary hack to adns_submit and everything stays good.
Right?

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
src/internal.h
src/query.c
src/types.c