Commit 0c70ab30 authored by Mark Andrews's avatar Mark Andrews
Browse files

672. [bug] The wrong time was in the "time signed" field when

                        replying with BADTIME error.
parent ad26c868
672. [bug] The wrong time was in the "time signed" field when
replying with BADTIME error.
671. [bug] The message code was failing to parse a message with 671. [bug] The message code was failing to parse a message with
no question section and a TSIG record. [RT #628] no question section and a TSIG record. [RT #628]
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
/* /*
* $Id: tsig.c,v 1.98 2000/12/08 03:10:32 bwelling Exp $ * $Id: tsig.c,v 1.99 2001/01/09 14:32:44 marka Exp $
* Principal Author: Brian Wellington * Principal Author: Brian Wellington
*/ */
...@@ -504,10 +504,9 @@ dns_tsig_sign(dns_message_t *msg) { ...@@ -504,10 +504,9 @@ dns_tsig_sign(dns_message_t *msg) {
} }
/* Digest the timesigned and fudge */ /* Digest the timesigned and fudge */
isc_buffer_clear(&databuf); isc_buffer_clear(&databuf);
if (tsig.error != dns_tsigerror_badtime) if (tsig.error == dns_tsigerror_badtime)
buffer_putuint48(&databuf, tsig.timesigned); tsig.timesigned = querytsig.timesigned;
else buffer_putuint48(&databuf, tsig.timesigned);
buffer_putuint48(&databuf, querytsig.timesigned);
isc_buffer_putuint16(&databuf, tsig.fudge); isc_buffer_putuint16(&databuf, tsig.fudge);
isc_buffer_usedregion(&databuf, &r); isc_buffer_usedregion(&databuf, &r);
ret = dst_context_adddata(ctx, &r); ret = dst_context_adddata(ctx, &r);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment