From 6ee18c68247399ccc8a3ce34fccdfe832a6cfe3d Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 18 Jan 2008 10:57:52 +0000 Subject: [PATCH] update ldns-testpkts. git-svn-id: file:///svn/unbound/trunk@878 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + testcode/ldns-testpkts.c | 5 +++++ testcode/ldns-testpkts.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 525dc8142..25b874a0b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/testcode/ldns-testpkts.c b/testcode/ldns-testpkts.c index d11929b79..f3ae4a3fb 100644 --- a/testcode/ldns-testpkts.c +++ b/testcode/ldns-testpkts.c @@ -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); diff --git a/testcode/ldns-testpkts.h b/testcode/ldns-testpkts.h index df9ee5237..1bb6c9e01 100644 --- a/testcode/ldns-testpkts.h +++ b/testcode/ldns-testpkts.h @@ -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 -- 2.47.2