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)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Oct 2014 19:39:45 +0000 (20:39 +0100)
commit938b0228d88a9166f9e808fe9fe8313f8d940977
treed1b4c54a275a48d8c580a2652a017e73c47c4b5e
parentb7be0042881e59f45a4c553db770abbbeb4871d9
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