]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixes.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 10 Apr 2015 10:57:25 +0000 (10:57 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 10 Apr 2015 10:57:25 +0000 (10:57 +0000)
git-svn-id: file:///svn/unbound/trunk@3392 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/unbound.conf.5.in
iterator/iterator.c
services/cache/infra.c

index d3346c9402cb35704823939afcb907e2d348de59..c0e4c60bbd95ae815a8ca6c5188f3cd013dd095a 100644 (file)
@@ -993,7 +993,7 @@ nameservers for those zones.
 .TP 5
 .B ratelimit\-size: \fI<memory size>
 Give the size of the data structure in which the current ongoing rates are
-kep track in.  Default 4m.  In bytes or use m(mega), k(kilo), g(giga).
+kept track in.  Default 4m.  In bytes or use m(mega), k(kilo), g(giga).
 The ratelimit structure is small, so this data structure likely does
 not need to be large.
 .TP 5
index 11312e16fb4c5c7409a91834fff63c05650acfc3..947255824cda4904754925c1f9e91884a18007a8 100644 (file)
@@ -1954,7 +1954,8 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
        if(!outq) {
                log_addr(VERB_DETAIL, "error sending query to auth server", 
                        &target->addr, target->addrlen);
-               infra_ratelimit_dec(qstate->env->infra_cache, iq->dp->name,
+               if(!(iq->chase_flags & BIT_RD))
+                   infra_ratelimit_dec(qstate->env->infra_cache, iq->dp->name,
                        iq->dp->namelen, *qstate->env->now);
                return next_state(iq, QUERYTARGETS_STATE);
        }
index 2c8f2fa284ec36788475405d0564c1a34a4658fb..d80ea27e80dee5b7fcf80f21fb617ab13ed63168 100644 (file)
@@ -162,13 +162,17 @@ static struct domain_limit_data* domain_limit_findcreate(
        /* can we find it? */
        d = (struct domain_limit_data*)name_tree_find(&infra->domain_limits,
                nm, nmlen, labs, LDNS_RR_CLASS_IN);
-       if(d)
+       if(d) {
+               free(nm);
                return d;
+       }
        
        /* create it */
        d = (struct domain_limit_data*)calloc(1, sizeof(*d));
-       if(!d)
+       if(!d) {
+               free(nm);
                return NULL;
+       }
        d->node.node.key = &d->node;
        d->node.name = nm;
        d->node.len = nmlen;
@@ -179,6 +183,8 @@ static struct domain_limit_data* domain_limit_findcreate(
        if(!name_tree_insert(&infra->domain_limits, &d->node, nm, nmlen,
                labs, LDNS_RR_CLASS_IN)) {
                log_err("duplicate element in domainlimit tree");
+               free(nm);
+               free(d);
                return NULL;
        }
        return d;