From: Vladimír Čunát Date: Mon, 9 Aug 2021 08:00:12 +0000 (+0200) Subject: modules/bogus_log nits X-Git-Tag: v5.4.1~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=223fba03245d7a025a051617ff2519595bc69ead;p=thirdparty%2Fknot-resolver.git modules/bogus_log nits - use notice log level instead of error The failure is often a normal condition but we probably want it logged by default (after explicitly loading the module). - don't repeat the "dnssec" word twice in a row (+update docs) - docs bogus_log.frequent(): we format tables differently (old change) --- diff --git a/modules/bogus_log/README.rst b/modules/bogus_log/README.rst index b3ed40ee5..d60c278eb 100644 --- a/modules/bogus_log/README.rst +++ b/modules/bogus_log/README.rst @@ -5,7 +5,7 @@ DNSSEC validation failure logging ================================= -This module adds error message for each DNSSEC validation failure. +This module logs a message for each DNSSEC validation failure (on ``notice`` :func:`level `). It is meant to provide hint to operators which queries should be investigated using diagnostic tools like DNSViz_. @@ -19,7 +19,7 @@ Example of error message logged by this module: .. code-block:: none - DNSSEC validation failure dnssec-failed.org. DNSKEY + [dnssec] validation failure: dnssec-failed.org. DNSKEY .. _DNSViz: http://dnsviz.net/ @@ -28,15 +28,17 @@ List of most frequent queries which fail as DNSSEC bogus can be obtained at run- .. code-block:: lua > bogus_log.frequent() - [1] => { - [type] => DNSKEY - [count] => 1 - [name] => dnssec-failed.org. - } - [2] => { - [type] => DNSKEY - [count] => 13 - [name] => rhybar.cz. + { + { + ['count'] = 1, + ['name'] = 'dnssec-failed.org.', + ['type'] = 'DNSKEY', + }, + { + ['count'] = 13, + ['name'] = 'rhybar.cz.', + ['type'] = 'DNSKEY', + }, } Please note that in future this module might be replaced diff --git a/modules/bogus_log/bogus_log.c b/modules/bogus_log/bogus_log.c index 489879993..7b36187ef 100644 --- a/modules/bogus_log/bogus_log.c +++ b/modules/bogus_log/bogus_log.c @@ -38,7 +38,7 @@ static int consume(kr_layer_t *ctx, knot_pkt_t *pkt) auto_free char *qname_text = kr_dname_text(knot_pkt_qname(pkt)); auto_free char *qtype_text = kr_rrtype_text(knot_pkt_qtype(pkt)); - kr_log_error(DNSSEC, "DNSSEC validation failure %s %s\n", qname_text, qtype_text); + kr_log_notice(DNSSEC, "validation failure: %s %s\n", qname_text, qtype_text); /* log of most frequent bogus queries */ uint16_t type = knot_pkt_qtype(pkt);