]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- print servfail info to log as error.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 17 Aug 2018 13:29:27 +0000 (13:29 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 17 Aug 2018 13:29:27 +0000 (13:29 +0000)
git-svn-id: file:///svn/unbound/trunk@4859 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c
services/mesh.c

index 6234bc512c498aebe12d7781392c20650967733c..f902b375c446f52f96404904b93e74a93179d2d4 100644 (file)
@@ -6,6 +6,7 @@
        - Set libunbound to increase current, because the libunbound change
          to the event callback function signature.  That needs programs,
          that use it, to recompile against the new header definition.
+       - print servfail info to log as error.
 
 16 August 2018: Wouter
        - Fix warning on compile without threads.
index cb20c1e7cbeac0c6d086c439a3d6e05837c47933..db7cdf539abbefb75a85bda9921cd54189140c78 100644 (file)
@@ -1853,6 +1853,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
                iq->qchase.qclass, NULL)) {
                /* fail -- no more targets, no more hope of targets, no hope 
                 * of a response. */
+               errinf(qstate, "all the configured stub or forward servers failed");
                verbose(VERB_QUERY, "configured stub or forward servers failed -- returning SERVFAIL");
                return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
        }
@@ -1989,6 +1990,8 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
                                iq->deleg_msg?iq->deleg_msg->rep:
                                (iq->response?iq->response->rep:NULL));
 
+       errinf(qstate, "all servers for this domain failed");
+       errinf_dname(qstate, ", at zonecut", iq->dp->name);
        verbose(VERB_QUERY, "out of query targets -- returning SERVFAIL");
        /* fail -- no more targets, no more hope of targets, no hope 
         * of a response. */
index 55b909ede1593ff24b39c8eb40c6667a5a8e90ee..38f9d99f8be538717c3b686d5216c7c21d9a5f52 100644 (file)
@@ -1155,6 +1155,21 @@ void mesh_query_done(struct mesh_state* mstate)
        struct mesh_cb* c;
        struct reply_info* rep = (mstate->s.return_msg?
                mstate->s.return_msg->rep:NULL);
+       if(mstate->s.return_rcode == LDNS_RCODE_SERVFAIL ||
+               (rep && FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_SERVFAIL)) {
+               char* err = errinf_to_str(&mstate->s);
+               if(err) {
+                       char nm[255+1];
+                       char* tp = sldns_wire2str_type(mstate->s.qinfo.qtype);
+                       char* cl = sldns_wire2str_class(mstate->s.qinfo.qclass);
+                       dname_str(mstate->s.qinfo.qname, nm);
+                       log_err("query %s %s %s SERVFAIL with reason: %s",
+                               nm, tp?tp:"t", cl?cl:"c", err);
+                       free(err);
+                       free(tp);
+                       free(cl);
+               }
+       }
        for(r = mstate->reply_list; r; r = r->next) {
                /* if a response-ip address block has been stored the
                 *  information should be logged for each client. */