From: Otto Date: Wed, 17 Feb 2021 13:07:22 +0000 (+0100) Subject: Add marker if name is in x-dnssec-names when logging validation status X-Git-Tag: dnsdist-1.6.0-alpha2~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b95336e19a7f6eecd598c8234008fbbc072d00;p=thirdparty%2Fpdns.git Add marker if name is in x-dnssec-names when logging validation status --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 4a39535143..425e450f0f 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1837,26 +1837,34 @@ static void startDoResolve(void *p) // Does the validation mode or query demand validation? if(!shouldNotValidate && sr.isDNSSECValidationRequested()) { try { - if(sr.doLog()) { - g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<check(dc->d_mdp.d_qname)) { + x_marker = " [in x-dnssec-names]"; + } } - auto state = sr.getValidationState(); + if(sr.doLog()) { + g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<getRemote()<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates correctly"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<getRemote()<<" validates correctly"<d_mdp.d_header.ad || DNSSECOK) pw.getHeader()->ad=1; } else if(state == vState::Insecure) { if(sr.doLog()) { - g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as Insecure"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<getRemote()<<" validates as Insecure"<ad=0; } else if (vStateIsBogus(state)) { @@ -1865,20 +1873,20 @@ static void startDoResolve(void *p) if(t_bogusqueryring) t_bogusqueryring->push_back(make_pair(dc->d_mdp.d_qname, dc->d_mdp.d_qtype)); if(g_dnssecLogBogus || sr.doLog() || g_dnssecmode == DNSSECMode::ValidateForLog) { - g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as "<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<getRemote()<<" validates as "<cd && (g_dnssecmode == DNSSECMode::ValidateAll || dc->d_mdp.d_header.ad || DNSSECOK)) { if(sr.doLog()) { g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" because recursor or query demands it for Bogus results"<rcode=RCode::ServFail; goto sendit; } else { if(sr.doLog()) { - g_log<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" Bogus validation since neither config nor query demands this"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<