]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] fixes to checkconf test, HIP casecompare
authorEvan Hunt <each@isc.org>
Thu, 28 Aug 2014 04:37:49 +0000 (21:37 -0700)
committerEvan Hunt <each@isc.org>
Thu, 28 Aug 2014 04:37:49 +0000 (21:37 -0700)
3933. [bug] Corrected the implementation of dns_rdata_casecompare()
for the HIP rdata type.  [RT #36911]

3932. [test] Improved named-checkconf tests. [RT #36911]

(cherry picked from commit 0c2313eb367de3b58801d643d52c0fd9bc0e5df7)
(cherry picked from commit d5669ee77c4c0fd6c794aa98c0f32897844a5f6d)

15 files changed:
CHANGES
bin/check/Makefile.in
bin/tests/system/checkconf/check-dup-records-fail.conf [new file with mode: 0644]
bin/tests/system/checkconf/check-dup-records.db [new file with mode: 0644]
bin/tests/system/checkconf/check-mx-cname-fail.conf [new file with mode: 0644]
bin/tests/system/checkconf/check-mx-cname.db [new file with mode: 0644]
bin/tests/system/checkconf/check-mx-fail.conf [new file with mode: 0644]
bin/tests/system/checkconf/check-mx.db [new file with mode: 0644]
bin/tests/system/checkconf/check-names-fail.conf [new file with mode: 0644]
bin/tests/system/checkconf/check-names.db [new file with mode: 0644]
bin/tests/system/checkconf/check-srv-cname-fail.conf [new file with mode: 0644]
bin/tests/system/checkconf/check-srv-cname.db [new file with mode: 0644]
bin/tests/system/checkconf/clean.sh
bin/tests/system/checkconf/tests.sh
lib/dns/rdata/generic/hip_55.c

diff --git a/CHANGES b/CHANGES
index 37486075b2b530aace0a71c2d7360e84034e0967..22c4c60a4928137c0f4afd88fa4c85dc87adb109 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+3933.  [bug]           Corrected the implementation of dns_rdata_casecompare()
+                       for the HIP rdata type.  [RT #36911]
+
+3932.  [test]          Improved named-checkconf tests. [RT #36911]
+
 3931.  [cleanup]       Cleanup how dlz grammer is defined. [RT #36879]
 
 3929.  [bug]           'host -a' needed to clear idnoptions. [RT #36963]
index c191605605b1bd1d9f33ab3854175ffca92df876..ffdaa49a3bf27cef517f91ce27c525de9ca3af6b 100644 (file)
@@ -70,7 +70,7 @@ named-checkzone.@O@: named-checkzone.c
                -c ${srcdir}/named-checkzone.c
 
 named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
-               ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
+               ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
        export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
        export LIBS0="${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
        ${FINALBUILDCMD}
diff --git a/bin/tests/system/checkconf/check-dup-records-fail.conf b/bin/tests/system/checkconf/check-dup-records-fail.conf
new file mode 100644 (file)
index 0000000..6dd363a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+options {
+  check-integrity yes; // default is yes
+};
+
+zone "check-dup-records" {
+  type master;
+  file "check-dup-records.db";
+  check-dup-records fail;
+};
+
diff --git a/bin/tests/system/checkconf/check-dup-records.db b/bin/tests/system/checkconf/check-dup-records.db
new file mode 100644 (file)
index 0000000..9c2669b
--- /dev/null
@@ -0,0 +1,36 @@
+; Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+;
+; Permission to use, copy, modify, and/or distribute this software for any
+; purpose with or without fee is hereby granted, provided that the above
+; copyright notice and this permission notice appear in all copies.
+;
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+; PERFORMANCE OF THIS SOFTWARE.
+
+$TTL 600       ; 10 minutes
+@              IN SOA  mname1. . (
+                               1          ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns2
+                       MX      10 mail
+
+mail                   A       10.0.0.1
+ns2                    A       10.53.0.2
+
+; following records are not de-duplicated
+; and will be matched by check-dup-records
+duplicate              HIP     ( 2 200100107B1A74DF365639CC39F1D578
+                                AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
+                                rvs.example.com. )
+duplicate              HIP     ( 2 200100107B1A74DF365639CC39F1D578
+                                AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
+                                RVS.example.com. )
diff --git a/bin/tests/system/checkconf/check-mx-cname-fail.conf b/bin/tests/system/checkconf/check-mx-cname-fail.conf
new file mode 100644 (file)
index 0000000..600e2a7
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+options {
+  check-integrity yes; // default is yes
+};
+
+zone "check-mx-cname" {
+  type master;
+  file "check-mx-cname.db";
+  check-mx-cname fail;
+};
diff --git a/bin/tests/system/checkconf/check-mx-cname.db b/bin/tests/system/checkconf/check-mx-cname.db
new file mode 100644 (file)
index 0000000..56312ec
--- /dev/null
@@ -0,0 +1,29 @@
+; Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+;
+; Permission to use, copy, modify, and/or distribute this software for any
+; purpose with or without fee is hereby granted, provided that the above
+; copyright notice and this permission notice appear in all copies.
+;
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+; PERFORMANCE OF THIS SOFTWARE.
+
+$TTL 600       ; 10 minutes
+@              IN SOA  mname1. . (
+                               1          ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns2
+                       MX      10 mail
+
+; MX points to a CNAME which is detected by check-mx-cname
+mail                   CNAME   ns2
+
+ns2                    A       10.53.0.2
diff --git a/bin/tests/system/checkconf/check-mx-fail.conf b/bin/tests/system/checkconf/check-mx-fail.conf
new file mode 100644 (file)
index 0000000..750adf1
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+options {
+  check-integrity yes; // default is yes
+};
+
+zone "check-mx" {
+  type master;
+  file "check-mx.db";
+  check-mx fail;
+};
diff --git a/bin/tests/system/checkconf/check-mx.db b/bin/tests/system/checkconf/check-mx.db
new file mode 100644 (file)
index 0000000..d6fa9f4
--- /dev/null
@@ -0,0 +1,27 @@
+; Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+;
+; Permission to use, copy, modify, and/or distribute this software for any
+; purpose with or without fee is hereby granted, provided that the above
+; copyright notice and this permission notice appear in all copies.
+;
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+; PERFORMANCE OF THIS SOFTWARE.
+
+$TTL 600       ; 10 minutes
+@              IN SOA  mname1. . (
+                               1          ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns2
+; MX appears to be an address and will be detected by check-mx
+                       MX      10 10.0.0.1
+
+ns2                    A       10.53.0.2
diff --git a/bin/tests/system/checkconf/check-names-fail.conf b/bin/tests/system/checkconf/check-names-fail.conf
new file mode 100644 (file)
index 0000000..5d31671
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+options {
+  check-integrity yes; // default is yes
+};
+
+zone "check-names" {
+  type master;
+  file "check-names.db";
+  check-names fail;
+};
diff --git a/bin/tests/system/checkconf/check-names.db b/bin/tests/system/checkconf/check-names.db
new file mode 100644 (file)
index 0000000..4a7d687
--- /dev/null
@@ -0,0 +1,31 @@
+; Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+;
+; Permission to use, copy, modify, and/or distribute this software for any
+; purpose with or without fee is hereby granted, provided that the above
+; copyright notice and this permission notice appear in all copies.
+;
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+; PERFORMANCE OF THIS SOFTWARE.
+
+$TTL 600       ; 10 minutes
+@              IN SOA  mname1. . (
+                               1          ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns2
+                       MX      10 mail
+
+mail                   A       10.0.0.1
+ns2                    A       10.53.0.2
+
+; the RDATA of this record contains a name that may be considered
+; invalid and will be detected by check-names configuration.
+check-names            SRV     1 2 3 _underscore
diff --git a/bin/tests/system/checkconf/check-srv-cname-fail.conf b/bin/tests/system/checkconf/check-srv-cname-fail.conf
new file mode 100644 (file)
index 0000000..f0503b3
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+options {
+  check-integrity yes; // default is yes
+};
+
+zone "check-srv-cname" {
+  type master;
+  file "check-srv-cname.db";
+  check-srv-cname fail;
+};
diff --git a/bin/tests/system/checkconf/check-srv-cname.db b/bin/tests/system/checkconf/check-srv-cname.db
new file mode 100644 (file)
index 0000000..6ed1f42
--- /dev/null
@@ -0,0 +1,31 @@
+; Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+;
+; Permission to use, copy, modify, and/or distribute this software for any
+; purpose with or without fee is hereby granted, provided that the above
+; copyright notice and this permission notice appear in all copies.
+;
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+; PERFORMANCE OF THIS SOFTWARE.
+
+$TTL 600       ; 10 minutes
+@              IN SOA  mname1. . (
+                               1          ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns2
+                       MX      10 mail
+
+mail                   A       10.0.0.1
+ns2                    A       10.53.0.2
+
+check-srv-cname                SRV     1 2 3   target
+; SRV points to a CNAME which is detected by check-srv-cname configuration
+target                 CNAME   mail
index e25471e0ba960f83d8d60dc66e87c62005852a52..6cecd93f0216b106c8a4c0939cff9b6bc997c619 100644 (file)
@@ -18,3 +18,4 @@
 
 rm -f good.conf.in good.conf.out badzero.conf
 rm -rf test.keydir
+rm -f checkconf.out*
index f658e9f1c485b06ea252ce26ed58a48bd72f6fbb..88da216241ebb8d21c6a9f4abb86fee2b0c8c4df 100644 (file)
@@ -131,5 +131,53 @@ $CHECKCONF -z altdb.conf > /dev/null 2>&1 || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
 status=`expr $status + $ret`
 
+echo "I: check that check-names fails as configured"
+ret=0
+$CHECKCONF -z check-names-fail.conf > checkconf.out1 2>&1 && ret=1
+grep "near '_underscore': bad name (check-names)" checkconf.out1 > /dev/null || ret=1
+grep "zone check-names/IN: loaded serial" < checkconf.out1 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
+echo "I: check that check-mx fails as configured"
+ret=0
+$CHECKCONF -z check-mx-fail.conf > checkconf.out2 2>&1 && ret=1
+grep "near '10.0.0.1': MX is an address" checkconf.out2 > /dev/null || ret=1
+grep "zone check-mx/IN: loaded serial" < checkconf.out2 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
+echo "I: check that check-dup-records fails as configured"
+ret=0
+$CHECKCONF -z check-dup-records-fail.conf > checkconf.out3 2>&1 && ret=1
+grep "has semantically identical records" checkconf.out3 > /dev/null || ret=1
+grep "zone check-dup-records/IN: loaded serial" < checkconf.out3 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
+echo "I: check that check-mx fails as configured"
+ret=0
+$CHECKCONF -z check-mx-fail.conf > checkconf.out4 2>&1 && ret=1
+grep "failed: MX is an address" checkconf.out4 > /dev/null || ret=1
+grep "zone check-mx/IN: loaded serial" < checkconf.out4 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
+echo "I: check that check-mx-cname fails as configured"
+ret=0
+$CHECKCONF -z check-mx-cname-fail.conf > checkconf.out5 2>&1 && ret=1
+grep "MX.* is a CNAME (illegal)" checkconf.out5 > /dev/null || ret=1
+grep "zone check-mx-cname/IN: loaded serial" < checkconf.out5 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
+echo "I: check that check-srv-cname fails as configured"
+ret=0
+$CHECKCONF -z check-srv-cname-fail.conf > checkconf.out6 2>&1 && ret=1
+grep "SRV.* is a CNAME (illegal)" checkconf.out6 > /dev/null || ret=1
+grep "zone check-mx-cname/IN: loaded serial" < checkconf.out6 > /dev/null && ret=1
+if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+status=`expr $status + $ret`
+
 echo "I:exit status: $status"
 exit $status
index 3522b7a7a94ac68665cb7e4e20deaa1ea8c7fbd9..eee581f26a952d5665d7711c420d30acad25a7c1 100644 (file)
@@ -468,23 +468,19 @@ casecompare_hip(ARGS_COMPARE) {
 
        INSIST(r1.length > 4);
        INSIST(r2.length > 4);
-       r1.length = 4;
-       r2.length = 4;
-       order = isc_region_compare(&r1, &r2);
+       order = memcmp(r1.base, r2.base, 4);
        if (order != 0)
                return (order);
 
        hit_len = uint8_fromregion(&r1);
        isc_region_consume(&r1, 2);         /* hit length + algorithm */
        key_len = uint16_fromregion(&r1);
-
-       dns_rdata_toregion(rdata1, &r1);
-       dns_rdata_toregion(rdata2, &r2);
-       isc_region_consume(&r1, 4);
+       isc_region_consume(&r1, 2);         /* key length */
        isc_region_consume(&r2, 4);
+
        INSIST(r1.length >= (unsigned) (hit_len + key_len));
        INSIST(r2.length >= (unsigned) (hit_len + key_len));
-       order = isc_region_compare(&r1, &r2);
+       order = memcmp(r1.base, r2.base, hit_len + key_len);
        if (order != 0)
                return (order);
        isc_region_consume(&r1, hit_len + key_len);