]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
INSIST(response);
authorMark Andrews <marka@isc.org>
Mon, 29 Aug 2011 04:02:54 +0000 (04:02 +0000)
committerMark Andrews <marka@isc.org>
Mon, 29 Aug 2011 04:02:54 +0000 (04:02 +0000)
lib/dns/tsig.c

index fe881f59da3cabba211abd7caec1bcc1c39bb0c7..38879efee4107a5d7ffd2ca03dcc47b74c54fe62 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: tsig.c,v 1.149 2011/08/25 06:20:07 marka Exp $
+ * $Id: tsig.c,v 1.150 2011/08/29 04:02:54 marka Exp $
  */
 /*! \file */
 #include <config.h>
@@ -1018,8 +1018,10 @@ dns_tsig_sign(dns_message_t *msg) {
                }
                /* Digest the timesigned and fudge */
                isc_buffer_clear(&databuf);
-               if (tsig.error == dns_tsigerror_badtime)
+               if (tsig.error == dns_tsigerror_badtime) {
+                       INSIST(response);
                        tsig.timesigned = querytsig.timesigned;
+               }
                isc_buffer_putuint48(&databuf, tsig.timesigned);
                isc_buffer_putuint16(&databuf, tsig.fudge);
                isc_buffer_usedregion(&databuf, &r);