From: Wouter Wijngaards Date: Thu, 20 Oct 2016 15:05:30 +0000 (+0000) Subject: - Fixup query_info local_alias init. X-Git-Tag: release-1.6.0rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2785225a43adcaa21aa8738abc26d78c9343502b;p=thirdparty%2Funbound.git - Fixup query_info local_alias init. git-svn-id: file:///svn/unbound/trunk@3901 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/cachedump.c b/daemon/cachedump.c index 4b0a583a6..8992e6cb8 100644 --- a/daemon/cachedump.c +++ b/daemon/cachedump.c @@ -563,6 +563,7 @@ load_qinfo(char* str, struct query_info* qinfo, struct regional* region) qinfo->qclass = sldns_wirerr_get_class(rr, rr_len, dname_len); qinfo->qname_len = dname_len; qinfo->qname = (uint8_t*)regional_alloc_init(region, rr, dname_len); + qinfo->local_alias = NULL; if(!qinfo->qname) { log_warn("error out of memory"); return NULL; @@ -826,6 +827,7 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm, qinfo.qname_len = nmlen; qinfo.qtype = LDNS_RR_TYPE_A; qinfo.qclass = LDNS_RR_CLASS_IN; + qinfo.local_alias = NULL; dname_str(nm, b); if(!ssl_printf(ssl, "The following name servers are used for lookup " diff --git a/daemon/remote.c b/daemon/remote.c index 4eddaa85a..e731b19b1 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1310,6 +1310,7 @@ do_cache_remove(struct worker* worker, uint8_t* nm, size_t nmlen, k.qname_len = nmlen; k.qtype = t; k.qclass = c; + k.local_alias = NULL; h = query_info_hash(&k, 0); slabhash_remove(worker->env.msg_cache, h, &k); if(t == LDNS_RR_TYPE_AAAA) { diff --git a/iterator/iter_utils.c b/iterator/iter_utils.c index 874dd6850..344b6aafd 100644 --- a/iterator/iter_utils.c +++ b/iterator/iter_utils.c @@ -532,6 +532,7 @@ causes_cycle(struct module_qstate* qstate, uint8_t* name, size_t namelen, qinf.qname_len = namelen; qinf.qtype = t; qinf.qclass = c; + qinf.local_alias = NULL; fptr_ok(fptr_whitelist_modenv_detect_cycle( qstate->env->detect_cycle)); return (*qstate->env->detect_cycle)(qstate, &qinf, diff --git a/iterator/iterator.c b/iterator/iterator.c index a2ba77822..5bd2be079 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -2012,6 +2012,7 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, iq->qinfo_out.qname_len = iq->dp->namelen; iq->qinfo_out.qtype = LDNS_RR_TYPE_A; iq->qinfo_out.qclass = iq->qchase.qclass; + iq->qinfo_out.local_alias = NULL; iq->minimise_count = 0; } diff --git a/libunbound/libworker.c b/libunbound/libworker.c index 08599090e..40cb0ff23 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -573,6 +573,7 @@ setup_qinfo_edns(struct libworker* w, struct ctx_query* q, { qinfo->qtype = (uint16_t)q->res->qtype; qinfo->qclass = (uint16_t)q->res->qclass; + qinfo->local_alias = NULL; qinfo->qname = sldns_str2wire_dname(q->res->qname, &qinfo->qname_len); if(!qinfo->qname) { return 0; diff --git a/services/mesh.c b/services/mesh.c index 60f828d9f..a77a69635 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -530,6 +530,7 @@ mesh_state_create(struct module_env* env, struct query_info* qinfo, /* init module qstate */ mstate->s.qinfo.qtype = qinfo->qtype; mstate->s.qinfo.qclass = qinfo->qclass; + mstate->s.qinfo.local_alias = NULL; mstate->s.qinfo.qname_len = qinfo->qname_len; mstate->s.qinfo.qname = regional_alloc_init(region, qinfo->qname, qinfo->qname_len); diff --git a/validator/val_neg.c b/validator/val_neg.c index a5e687fdc..272c5e027 100644 --- a/validator/val_neg.c +++ b/validator/val_neg.c @@ -1007,6 +1007,7 @@ int val_neg_dlvlookup(struct val_neg_cache* neg, uint8_t* qname, size_t len, qinfo.qname = qname; qinfo.qtype = LDNS_RR_TYPE_DLV; qinfo.qclass = qclass; + qinfo.local_alias = NULL; if(!nsec_proves_nodata(nsec, &qinfo, &wc) && !val_nsec_proves_name_error(nsec, qname)) { /* the NSEC is not a denial for the DLV */ diff --git a/validator/val_utils.c b/validator/val_utils.c index ecf20f8e5..da8066aad 100644 --- a/validator/val_utils.c +++ b/validator/val_utils.c @@ -1138,6 +1138,7 @@ val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c, qinfo.qname_len = nmlen; qinfo.qtype = LDNS_RR_TYPE_DS; qinfo.qclass = c; + qinfo.local_alias = NULL; /* do not add SOA to reply message, it is going to be used internal */ msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache, env->scratch_buffer, *env->now, 0, topname);