]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix only misc failure from log-servfail when val-log-level is not
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Aug 2018 14:31:37 +0000 (14:31 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Aug 2018 14:31:37 +0000 (14:31 +0000)
  enabled.

git-svn-id: file:///svn/unbound/trunk@4869 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/config_file.c

index 9328948999074b157968747df4147510dfbe524d..a98ce05b58c3e252cad547f6572d69f73bc44747 100644 (file)
@@ -2,6 +2,8 @@
        - log-local-actions: yes option for unbound.conf that logs all the
          local zone actions, a patch from Saksham Manchanda (Secure64).
        - #4146: num.query.subnet and num.query.subnet_cache counters.
+       - Fix only misc failure from log-servfail when val-log-level is not
+         enabled.
 
 17 August 2018: Ralph
        - Fix classification for QTYPE=CNAME queries when QNAME minimisation is
index 03f066ceef3a58f367a4853c8e7219f13d5d494b..7d933ca6e3b82d95eeecf0f21950b20e59281d6d 100644 (file)
@@ -2197,7 +2197,7 @@ void w_config_adjust_directory(struct config_file* cfg)
 void errinf(struct module_qstate* qstate, const char* str)
 {
        struct config_strlist* p;
-       if(qstate->env->cfg->val_log_level < 2 || !str)
+       if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str)
                return;
        p = (struct config_strlist*)regional_alloc(qstate->region, sizeof(*p));
        if(!p) {
@@ -2222,7 +2222,7 @@ void errinf(struct module_qstate* qstate, const char* str)
 void errinf_origin(struct module_qstate* qstate, struct sock_list *origin)
 {
        struct sock_list* p;
-       if(qstate->env->cfg->val_log_level < 2)
+       if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
                return;
        for(p=origin; p; p=p->next) {
                char buf[256];
@@ -2294,7 +2294,7 @@ void errinf_rrset(struct module_qstate* qstate, struct ub_packed_rrset_key *rr)
        char buf[1024];
        char dname[LDNS_MAX_DOMAINLEN+1];
        char t[16], c[16];
-       if(qstate->env->cfg->val_log_level < 2 || !rr)
+       if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !rr)
                return;
        sldns_wire2str_type_buf(ntohs(rr->rk.type), t, sizeof(t));
        sldns_wire2str_class_buf(ntohs(rr->rk.rrset_class), c, sizeof(c));
@@ -2307,7 +2307,7 @@ void errinf_dname(struct module_qstate* qstate, const char* str, uint8_t* dname)
 {
        char b[1024];
        char buf[LDNS_MAX_DOMAINLEN+1];
-       if(qstate->env->cfg->val_log_level < 2 || !str || !dname)
+       if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str || !dname)
                return;
        dname_str(dname, buf);
        snprintf(b, sizeof(b), "%s %s", str, buf);