]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
update ldns-testpkts.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 18 Jan 2008 10:57:52 +0000 (10:57 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 18 Jan 2008 10:57:52 +0000 (10:57 +0000)
git-svn-id: file:///svn/unbound/trunk@878 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testcode/ldns-testpkts.c
testcode/ldns-testpkts.h

index 525dc8142a7af39b0fe8c110f4a551365c1b071c..25b874a0b91bd67fce76f7e627b0f6ee61bd16a0 100644 (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.
index d11929b7939a09a14e4ef556514137a1824de1ad..f3ae4a3fb7d2e994af1d7bed5de86cf54646ab93 100644 (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);
index df9ee5237f5b4067f1cd04d51d79adb50fb12440..1bb6c9e0130fcba5d3ea1efd8e25b57e1ca75beb 100644 (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