]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2471. [bug] named-checkzone was not reporting missing manditory
authorMark Andrews <marka@isc.org>
Fri, 24 Oct 2008 00:38:02 +0000 (00:38 +0000)
committerMark Andrews <marka@isc.org>
Fri, 24 Oct 2008 00:38:02 +0000 (00:38 +0000)
                        glue when sibling checks were disabled. [RT #18768]

CHANGES
bin/check/check-tool.c
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 0ad3278695ae5f66148422069cb104cfea7fb87d..85d216daf4f6404be814851a4e5842ce8b064eb5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2471.  [bug]           named-checkzone was not reporting missing manditory
+                       glue when sibling checks were disabled. [RT #18768]
+
 2469.  [port]          solaris: Work around Solaris's select() limitations.
                        [RT #18769]
 
index 1f5f1cdc985b1608adfbff152445224539d6a491..140e56699e20cb6f5326d5b4e11cf4c5df469a15 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check-tool.c,v 1.10.18.18 2007/09/13 05:04:01 each Exp $ */
+/* $Id: check-tool.c,v 1.10.18.19 2008/10/24 00:38:02 marka Exp $ */
 
 /*! \file */
 
 
 #include <isccfg/log.h>
 
+#ifndef CHECK_SIBLING
+#define CHECK_SIBLING 1
+#endif
+
+#ifndef CHECK_LOCAL
+#define CHECK_LOCAL 1
+#endif
+
 #ifdef HAVE_ADDRINFO
 #ifdef HAVE_GETADDRINFO
 #ifdef HAVE_GAISTRERROR
@@ -65,14 +73,23 @@ static const char *dbtype[] = { "rbt" };
 
 int debug = 0;
 isc_boolean_t nomerge = ISC_TRUE;
+#if CHECK_LOCAL
 isc_boolean_t docheckmx = ISC_TRUE;
 isc_boolean_t dochecksrv = ISC_TRUE;
 isc_boolean_t docheckns = ISC_TRUE;
+#else
+isc_boolean_t docheckmx = ISC_FALSE;
+isc_boolean_t dochecksrv = ISC_FALSE;
+isc_boolean_t docheckns = ISC_FALSE;
+#endif
 unsigned int zone_options = DNS_ZONEOPT_CHECKNS | 
                            DNS_ZONEOPT_CHECKMX |
                            DNS_ZONEOPT_MANYERRORS |
                            DNS_ZONEOPT_CHECKNAMES |
                            DNS_ZONEOPT_CHECKINTEGRITY |
+#if CHECK_SIBLING
+                           DNS_ZONEOPT_CHECKSIBLING |
+#endif
                            DNS_ZONEOPT_CHECKWILDCARD |
                            DNS_ZONEOPT_WARNMXCNAME |
                            DNS_ZONEOPT_WARNSRVCNAME;
index 6696f7437f8855773d6967f7d8a3efc6189b195a..420b8cc5c5bfc195da4c9d90a67ce7e90d470a27 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.410.18.53 2007/12/02 22:31:35 marka Exp $ */
+/* $Id: zone.c,v 1.410.18.54 2008/10/24 00:38:01 marka Exp $ */
 
 /*! \file */
 
@@ -1660,14 +1660,16 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        if (result == DNS_R_NXRRSET || result == DNS_R_NXDOMAIN ||
            result == DNS_R_EMPTYNAME || result == DNS_R_DELEGATION) {
                const char *what;
-               if (dns_name_issubdomain(name, owner))
+               isc_boolean_t required = ISC_FALSE;
+               if (dns_name_issubdomain(name, owner)) {
                        what = "REQUIRED GLUE ";
-               else if (result == DNS_R_DELEGATION)
+                       required = ISC_TRUE;
+                } else if (result == DNS_R_DELEGATION)
                        what = "SIBLING GLUE ";
                else
                        what = "";
 
-               if (result != DNS_R_DELEGATION ||
+               if (result != DNS_R_DELEGATION || required ||
                    DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKSIBLING)) {
                        dns_zone_log(zone, level, "%s/NS '%s' has no %s"
                                     "address records (A or AAAA)",