From: Wouter Wijngaards Date: Tue, 18 Sep 2007 12:33:51 +0000 (+0000) Subject: print validator classification type. X-Git-Tag: release-0.5~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8bcec4529dccb3c5372a105413d03340d041974;p=thirdparty%2Funbound.git print validator classification type. update plan items. git-svn-id: file:///svn/unbound/trunk@619 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 72313047c..9745ad622 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 18 September 2007: Wouter - wildcard nsec3 testcases, and fixup to get correct wildcard name. + - validator prints subtype classification for debug. 17 September 2007: Wouter - NSEC3 hash cache unit test. diff --git a/doc/plan b/doc/plan index 96ba41c2d..00b8bf5cb 100644 --- a/doc/plan +++ b/doc/plan @@ -153,9 +153,22 @@ Styleguide: *** Bigger and Better * Config file syntax checker program. Tests on checker. * Logging first class feature with config options. + * with logfile turnover to avoid Gbs of logs. * donotqueryaddresses with trie for blocking entire netblocks. * Memory overhaul, special allocators for hashtable caches, and mesh qstates. + * keep a preallocated list of region-chunks per worker thread. + * allocate region struct and cleanup list in region itself; use + linked list cleanup list. unit test on this. do not call region + to avoid name-collision with nsd regions, 'regional'. * read root hints from file. +* failure to return answer, w. reason (donotq, noanswer servers, cannot + find servers, validationfail w.classification, error), + with threadno, starttime and endtime and qname/type/class, prime/qflags, + from-clients, from-internal, has-subrequests, a nice error report, + so that an excerpt from those times can be made from the logs. + logfileparsing tool that makes these excerpts and emails them. +* ANS failure workaround (nxdomain for ENT; check if nxdomain is ENTnodata). +* clear cache as a callback from the new-rrset-id routine. *** Local zones feature. * Build in local zone features. First the total stop for1912. @@ -205,7 +218,9 @@ Styleguide: * Be able to prime roots using several queries (like, get only NS first). * Nicer statistics * private TTL, dTLS features. - +* retry-mode, where a bogus result triggers a retry-mode query, where a list + of responses over a time interval is collected, and each is validated. +* draft-timers, DLV features. treeshrew/ validator/ *.c *.h diff --git a/validator/val_utils.c b/validator/val_utils.c index f1e5dd115..975ea9c8a 100644 --- a/validator/val_utils.c +++ b/validator/val_utils.c @@ -698,3 +698,21 @@ val_next_unchecked(struct reply_info* rep, size_t skip) } return rep->rrset_count; } + +const char* +val_classification_to_string(enum val_classification subtype) +{ + switch(subtype) { + case VAL_CLASS_UNTYPED: return "untyped"; + case VAL_CLASS_UNKNOWN: return "unknown"; + case VAL_CLASS_POSITIVE: return "positive"; + case VAL_CLASS_CNAME: return "cname"; + case VAL_CLASS_NODATA: return "nodata"; + case VAL_CLASS_NAMEERROR: return "nameerror"; + case VAL_CLASS_CNAMENOANSWER: return "cnamenoanswer"; + case VAL_CLASS_REFERRAL: return "referral"; + case VAL_CLASS_ANY: return "qtype_any"; + default: + return "bad_val_classification"; + } +} diff --git a/validator/val_utils.h b/validator/val_utils.h index d19bf5f19..c6fe5f748 100644 --- a/validator/val_utils.h +++ b/validator/val_utils.h @@ -250,4 +250,11 @@ void val_mark_insecure(struct reply_info* rep, struct key_entry_key* kkey, */ size_t val_next_unchecked(struct reply_info* rep, size_t skip); +/** + * Get string to denote the classification result. + * @param subtype: from classification function. + * @return static string to describe the classification. + */ +const char* val_classification_to_string(enum val_classification subtype); + #endif /* VALIDATOR_VAL_UTILS_H */ diff --git a/validator/validator.c b/validator/validator.c index f1cf63a83..398c82b92 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -1019,6 +1019,8 @@ processInit(struct module_qstate* qstate, struct val_qstate* vq, enum val_classification subtype = val_classify_response( qstate->query_flags, &vq->qchase, vq->orig_msg->rep, vq->rrset_skip); + verbose(VERB_ALGO, "validator classification %s", + val_classification_to_string(subtype)); if(subtype == VAL_CLASS_REFERRAL && vq->rrset_skip < vq->orig_msg->rep->rrset_count) { /* referral uses the rrset name as qchase, to find keys for