diff options
author | Riccardo Spagni <ric@spagni.net> | 2014-12-04 23:10:49 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-12-04 23:10:49 +0200 |
commit | 831933425b3406310e70476dc56e822f7ae3c549 (patch) | |
tree | bd05c1b54f8cff8ef0bc1f769a22232172ec2a96 /external/unbound/util/data/msgreply.c | |
parent | increased version number for tagged release (diff) | |
download | monero-831933425b3406310e70476dc56e822f7ae3c549.tar.xz |
update unbound from upstream
Diffstat (limited to 'external/unbound/util/data/msgreply.c')
-rw-r--r-- | external/unbound/util/data/msgreply.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/external/unbound/util/data/msgreply.c b/external/unbound/util/data/msgreply.c index 126e7bef4..68bcfd09e 100644 --- a/external/unbound/util/data/msgreply.c +++ b/external/unbound/util/data/msgreply.c @@ -576,10 +576,12 @@ reply_info_delete(void* d, void* ATTR_UNUSED(arg)) } hashvalue_t -query_info_hash(struct query_info *q) +query_info_hash(struct query_info *q, uint16_t flags) { hashvalue_t h = 0xab; h = hashlittle(&q->qtype, sizeof(q->qtype), h); + if(q->qtype == LDNS_RR_TYPE_AAAA && (flags&BIT_CD)) + h++; h = hashlittle(&q->qclass, sizeof(q->qclass), h); h = dname_query_hash(q->qname, h); return h; @@ -771,15 +773,14 @@ log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* rep) region, 65535, 1)) { log_info("%s: log_dns_msg: out of memory", str); } else { - char* str = sldns_wire2str_pkt(sldns_buffer_begin(buf), + char* s = sldns_wire2str_pkt(sldns_buffer_begin(buf), sldns_buffer_limit(buf)); - if(!str) { + if(!s) { log_info("%s: log_dns_msg: ldns tostr failed", str); } else { - log_info("%s %s", - str, (char*)sldns_buffer_begin(buf)); + log_info("%s %s", str, s); } - free(str); + free(s); } sldns_buffer_free(buf); regional_destroy(region); |