]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove extended flags before comparing if set
authorMark Andrews <marka@isc.org>
Mon, 12 Oct 2009 06:05:29 +0000 (06:05 +0000)
committerMark Andrews <marka@isc.org>
Mon, 12 Oct 2009 06:05:29 +0000 (06:05 +0000)
lib/dns/dst_api.c

index b79ed3fa63a5f613c4053cf34699d4482192063b..5eb43fec801b8c0aa7f89fa3c8fea70c1657c23e 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.37 2009/10/12 05:50:52 marka Exp $
+ * $Id: dst_api.c,v 1.38 2009/10/12 06:05:29 marka Exp $
  */
 
 /*! \file */
@@ -930,6 +930,8 @@ pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
                return (ISC_FALSE);
        /* Zero out flags. */
        buf1[0] = buf1[1] = 0;
+       if ((key1->key_flags & DNS_KEYFLAG_EXTENDED) != 0)
+               isc_buffer_subtract(&b1, 2);
 
        isc_buffer_init(&b2, buf2, sizeof(buf2));
        result = dst_key_todns(key2, &b2);
@@ -937,6 +939,8 @@ pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
                return (ISC_FALSE);
        /* Zero out flags. */
        buf2[0] = buf2[1] = 0;
+       if ((key2->key_flags & DNS_KEYFLAG_EXTENDED) != 0)
+               isc_buffer_subtract(&b2, 2);
 
        isc_buffer_usedregion(&b1, &r1);
        isc_buffer_usedregion(&b2, &r2);