]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3249. [bug] Update log message when saving slave zones files for
authorMark Andrews <marka@isc.org>
Tue, 20 Dec 2011 00:06:54 +0000 (00:06 +0000)
committerMark Andrews <marka@isc.org>
Tue, 20 Dec 2011 00:06:54 +0000 (00:06 +0000)
                        analysis after load failures. [RT #27087]

3248.   [bug]           Configure options --enable-fixed-rrset and
                        --enable-exportlib were incompatible with each
                        other. [RT #27087]

3247.   [bug]           'raw' format zones failed to preserve load order
                        breaking 'fixed' sort order. [RT #27087]

3246.   [bug]           Named failed to start with a empty also-notify list.
                        [RT #27087]

CHANGES
bin/named/zoneconf.c
bin/tests/system/notify/ns2/named.conf
lib/dns/ecdb.c
lib/dns/masterdump.c
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 5731cb6d078e2bda592c219fa75539cc0437789c..5d678146cf387b1e516ad44ca2b9678f4916a744 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,16 @@
+3249.  [bug]           Update log message when saving slave zones files for
+                       analysis after load failures. [RT #27087]
+
+3248.  [bug]           Configure options --enable-fixed-rrset and
+                       --enable-exportlib were incompatible with each
+                       other. [RT #27087]
+
+3247.  [bug]           'raw' format zones failed to preserve load order
+                       breaking 'fixed' sort order. [RT #27087]
+
+3246.  [bug]           Named failed to start with a empty also-notify list.
+                       [RT #27087]
+
 3245.  [bug]           Don't report a error unchanged serials unless there
                        were other changes when thawing a zone with
                        ixfr-fromdifferences. [RT #26845]
index 68387d8cec9b8c1bbd52e4b6e4e16c4fbbf776b1..4d6a2ce2e9ea2eef91d892b5d3359830c18f9cb1 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.185 2011/10/26 15:23:36 each Exp $ */
+/* $Id: zoneconf.c,v 1.186 2011/12/20 00:06:54 marka Exp $ */
 
 /*% */
 
@@ -1045,8 +1045,11 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        result = dns_zone_setalsonotifywithkeys(zone, addrs,
                                                                keynames,
                                                                addrcount);
-                       ns_config_putipandkeylist(mctx, &addrs, &keynames,
-                                                 addrcount);
+                       if (addrcount != 0)
+                               ns_config_putipandkeylist(mctx, &addrs,
+                                                         &keynames, addrcount);
+                       else
+                               INSIST(addrs == NULL && keynames == NULL);
                        RETERR(result);
                } else
                        RETERR(dns_zone_setalsonotify(zone, NULL, 0));
@@ -1458,8 +1461,11 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                                                         &count));
                        result = dns_zone_setmasterswithkeys(mayberaw, addrs,
                                                             keynames, count);
-                       ns_config_putipandkeylist(mctx, &addrs, &keynames,
-                                                 count);
+                       if (count != 0)
+                               ns_config_putipandkeylist(mctx, &addrs,
+                                                         &keynames, count);
+                       else
+                               INSIST(addrs == NULL && keynames == NULL);
                } else
                        result = dns_zone_setmasters(mayberaw, NULL, 0);
                RETERR(result);
index d77696806ef0aae08d22a20f91480988ace44f15..139114639efa7581d7085fe6e0ca110e997c456e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.22 2011/10/17 23:46:33 tbox Exp $ */
+/* $Id: named.conf,v 1.23 2011/12/20 00:06:54 marka Exp $ */
 
 controls { /* empty */ };
 
@@ -39,4 +39,6 @@ zone "." {
 zone "example" {
        type master;
        file "example.db";
+       // Check that named can handle a empty also-notify.
+       also-notify { /* empty */ };
 };
index d71c4503b28b958ba5fbc7f4f01cce6a800af05b..fa08f0860c3300569cf9cdc72993ea5234a8dd4c 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ecdb.c,v 1.9 2011/10/11 13:33:45 marka Exp $ */
+/* $Id: ecdb.c,v 1.10 2011/12/20 00:06:53 marka Exp $ */
 
 #include "config.h"
 
 #define ECDBNODE_MAGIC         ISC_MAGIC('E', 'C', 'D', 'N')
 #define VALID_ECDBNODE(ecdbn)  ISC_MAGIC_VALID(ecdbn, ECDBNODE_MAGIC)
 
-#if DNS_RDATASET_FIXED
-#error "Fixed rdataset isn't supported in this implementation"
-#endif
-
 /*%
  * The 'ephemeral' cache DB (ecdb) implementation.  An ecdb just provides
  * temporary storage for ongoing name resolution with the common DB interfaces.
@@ -662,7 +658,11 @@ rdataset_first(dns_rdataset_t *rdataset) {
                rdataset->private5 = NULL;
                return (ISC_R_NOMORE);
        }
+#if DNS_RDATASET_FIXED
+       raw += 2 + (4 * count);
+#else
        raw += 2;
+#endif
        /*
         * The privateuint4 field is the number of rdata beyond the cursor
         * position, so we decrement the total count by one before storing
@@ -688,7 +688,11 @@ rdataset_next(dns_rdataset_t *rdataset) {
        rdataset->privateuint4 = count;
        raw = rdataset->private5;
        length = raw[0] * 256 + raw[1];
+#if DNS_RDATASET_FIXED
+       raw += length + 4;
+#else
        raw += length + 2;
+#endif
        rdataset->private5 = raw;
 
        return (ISC_R_SUCCESS);
@@ -704,7 +708,11 @@ rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
        REQUIRE(raw != NULL);
 
        length = raw[0] * 256 + raw[1];
+#if DNS_RDATASET_FIXED
+       raw += 4;
+#else
        raw += 2;
+#endif
        if (rdataset->type == dns_rdatatype_rrsig) {
                if (*raw & DNS_RDATASLAB_OFFLINE)
                        flags |= DNS_RDATA_OFFLINE;
index c3f6dd6e2ac633494a64335b2cb4be555e0b8bef..9bda235f68092947a16cda0b66c4545ccc9c420c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.112 2011/12/08 23:46:48 tbox Exp $ */
+/* $Id: masterdump.c,v 1.113 2011/12/20 00:06:53 marka Exp $ */
 
 /*! \file */
 
@@ -932,6 +932,7 @@ dump_rdataset_raw(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
        REQUIRE(buffer->length > 0);
        REQUIRE(DNS_RDATASET_VALID(rdataset));
 
+       rdataset->attributes |= DNS_RDATASETATTR_LOADORDER;
  restart:
        totallen = 0;
        result = dns_rdataset_first(rdataset);
index 124aecd83733f9c006132ee6fbde9c6021397c8e..f20c758ff9838d7983d48d41af7e5524e2df4a52 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.655 2011/12/19 23:46:12 marka Exp $ */
+/* $Id: zone.c,v 1.656 2011/12/20 00:06:53 marka Exp $ */
 
 /*! \file */
 
@@ -14049,8 +14049,9 @@ zone_saveunique(dns_zone_t *zone, const char *path, const char *templat) {
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
-       dns_zone_log(zone, ISC_LOG_WARNING, "saved '%s' as '%s'",
-                    path, buf);
+       dns_zone_log(zone, ISC_LOG_WARNING, "unable to load from '%'; "
+                    "renaming file to '%s' for failure analysis and "
+                    "retransferring.", path, buf);
 
  cleanup:
        isc_mem_put(zone->mctx, buf, buflen);