update ldns-testpkts.

git-svn-id: file:///svn/unbound/trunk@878 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-01-18 10:57:52 +00:00
parent e8f4ac9b1a
commit 6ee18c6824
3 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- fix for BSD, do not use ip4to6 mapping, make two sockets, once
ip6 and once ip4, uses socket options.
- goodbye ip4to6 mapping.
- update ldns-testpkts with latest version from ldns-trunk.
17 January 2008: Wouter
- fixup configure in case -lldns is installed.

View file

@ -781,9 +781,14 @@ handle_query(uint8_t* inbuf, ssize_t inlen, struct entry* entries, int* count,
answer_pkt = NULL;
} else {
verbose(3, "Could not parse hex data (%s), sending hex data directly.\n", ldns_get_errorstr_by_id(status));
/* still try to adjust ID */
answer_size = ldns_buffer_capacity(p->reply_from_hex);
outbuf = LDNS_XMALLOC(uint8_t, answer_size);
memcpy(outbuf, ldns_buffer_export(p->reply_from_hex), answer_size);
if(entry->copy_id) {
ldns_write_uint16(outbuf,
ldns_pkt_id(query_pkt));
}
}
} else {
answer_pkt = ldns_pkt_clone(p->reply);

View file

@ -78,7 +78,7 @@
; with the SECTION keywords (only SECTION QUERY
; is used to match queries). If the data cannot
; be parsed, ADJUST rules for the answer packet
; are ignored
; are ignored. Only copy_id is done.
HEX_ANSWER_END
ENTRY_END