]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1254. [bug] When signing/verifying rdatasets, duplicate rdatas
authorMark Andrews <marka@isc.org>
Mon, 22 Jul 2002 02:49:14 +0000 (02:49 +0000)
committerMark Andrews <marka@isc.org>
Mon, 22 Jul 2002 02:49:14 +0000 (02:49 +0000)
                        need to be suppressed.

CHANGES
lib/dns/dnssec.c

diff --git a/CHANGES b/CHANGES
index 850f29380e365fa2dac05aed2833af6b150ba2d7..3922a41cdf32d307bc92d8f73ef9014c7f92312f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1254.  [bug]           When signing/verifying rdatasets, duplicate rdatas
+                       need to be suppressed.
+
 1253.  [contrib]       queryperf now reports a summary of returned
                        rcodes (-c), rcodes are printed in neumonic form (-v).
                        
index 9535f944c5cc97ae6d63185a026dfa568cc40868..c75a2410901139dc7a8653542f57ca163edae6d6 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: dnssec.c,v 1.73 2002/02/20 03:34:11 marka Exp $
+ * $Id: dnssec.c,v 1.74 2002/07/22 02:49:14 marka Exp $
  */
 
 
@@ -276,6 +276,12 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
                isc_buffer_t lenbuf;
                isc_region_t lenr;
 
+               /*
+                * Skip duplicates.
+                */
+               if (i > 0 && dns_rdata_compare(&rdatas[i], &rdatas[i-1]) == 0)
+                   continue;
+
                /*
                 * Digest the envelope.
                 */
@@ -435,6 +441,12 @@ dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
                isc_buffer_t lenbuf;
                isc_region_t lenr;
 
+               /*
+                * Skip duplicates.
+                */
+               if (i > 0 && dns_rdata_compare(&rdatas[i], &rdatas[i-1]) == 0)
+                   continue;
+
                /*
                 * Digest the envelope.
                 */