]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 22 Jan 2002 22:51:05 +0000 (22:51 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 22 Jan 2002 22:51:05 +0000 (22:51 +0000)
1164.   [bug]           Empty masters clauses in slave / stub zones were not
                        handled gracefully.  [RT #2262]

CHANGES
lib/isccfg/check.c

diff --git a/CHANGES b/CHANGES
index 2041bf6c5c04fe9280ec6a64cb04ebcf9130ba2b..d8d19c32889e5d0acbbcdbc70f0c6a6f99eccf64 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,9 @@
                        for clients that are supplied recursive service.
                        [RT #2260]
 
+1164.  [bug]           Empty masters clauses in slave / stub zones were not
+                       handled gracefully. [RT #2262]
+
 1162.  [bug]           The allow-notify option was not accepted in slave
                        zone statements.
 
index f9f9d444da68e9c92a5a768ef2cc0952b5df1eba..e5a24d8359cd08c03d2c81c7e1da9618a6175bce 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.14.2.7 2001/12/13 06:47:48 marka Exp $ */
+/* $Id: check.c,v 1.14.2.8 2002/01/22 22:51:05 gson Exp $ */
 
 #include <config.h>
 
@@ -107,6 +107,7 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx) {
        unsigned int ztype;
        cfg_obj_t *zoptions;
        cfg_obj_t *obj = NULL;
+       cfg_obj_t *addrlist = NULL;
        isc_symvalue_t symvalue;
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
@@ -227,6 +228,13 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx) {
                                    zname);
                        result = ISC_R_FAILURE;
                }
+               addrlist = cfg_tuple_get(obj, "addresses");
+               if (cfg_list_first(addrlist) == NULL) {
+                       cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+                                   "zone '%s': empty 'masters' entry",
+                                   zname);
+                       result = ISC_R_FAILURE;
+               }
        }
 
        /*