]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
correct timestamp on query packets
authorMatthijs Mekking <matje@NLnetLabs.nl>
Wed, 8 Dec 2010 12:35:28 +0000 (12:35 +0000)
committerMatthijs Mekking <matje@NLnetLabs.nl>
Wed, 8 Dec 2010 12:35:28 +0000 (12:35 +0000)
Changelog
resolver.c

index c90cc6fcc41fd15c88a337347b7e0092c465970c..ecb20353826dc3b9aba49f8348ac9422fb016e56 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,10 +1,11 @@
 1.6.8
        * Fix ldns zone, so that $TTL definition match RFC 2308.
-    * Drill: Print both SHA-1 and SHA-256 corresponding DS records.
        * Fix lots of missing checks on allocation failures and parse of 
          NSEC with many types and max parse length in hosts_frm_fp routine
          and off by one in read_anchor_file routine (thanks Dan Kaminsky and
          Justin Ferguson).
+       * Drill: Print both SHA-1 and SHA-256 corresponding DS records.
+       * Print correct WHEN in query packet (is not always 1-1-1970)
 
 1.6.7  2010-11-08
        * EXPERIMENTAL ecdsa implementation, please do not enable on real
index 34bd35b0dd0c0c275af850a3eff2532c25671b9e..ffb3b25d45e163ed7cc094c3967dcd80c9c0b417 100644 (file)
@@ -1079,6 +1079,8 @@ ldns_resolver_prepare_query_pkt(ldns_pkt **query_pkt, ldns_resolver *r,
                                 const ldns_rdf *name, ldns_rr_type t,
                                 ldns_rr_class c, uint16_t flags)
 {
+       struct timeval now;
+
        /* prepare a question pkt from the parameters
         * and then send this */
        *query_pkt = ldns_pkt_query_new(ldns_rdf_clone(name), t, c, flags);
@@ -1102,6 +1104,12 @@ ldns_resolver_prepare_query_pkt(ldns_pkt **query_pkt, ldns_resolver *r,
                ldns_pkt_set_edns_udp_size(*query_pkt, ldns_resolver_edns_udp_size(r));
        }
 
+       /* set the timestamp */
+       now.tv_sec = time(NULL);
+       now.tv_usec = 0;
+       ldns_pkt_set_timestamp(*query_pkt, now);
+
+
        if (ldns_resolver_debug(r)) {
                ldns_pkt_print(stdout, *query_pkt);
        }