]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
treat the signed instance of a inline zone as dynamic
authorMark Andrews <marka@isc.org>
Thu, 26 Jul 2018 03:59:22 +0000 (13:59 +1000)
committerMark Andrews <marka@isc.org>
Thu, 2 Aug 2018 04:27:41 +0000 (14:27 +1000)
(cherry picked from commit 9130f055f43a776a942855cd6d25028c9b0bdc45)

lib/dns/zone.c

index 9e81156ca0f57f94c1c436a5a7a3d3e5dde7cec3..bd90156cc49b23e43ee444c7e6028dc4d9d1e8f9 100644 (file)
@@ -1774,6 +1774,10 @@ dns_zone_isdynamic(dns_zone_t *zone, isc_boolean_t ignore_freeze) {
            (zone->type == dns_zone_redirect && zone->masters != NULL))
                return (ISC_TRUE);
 
+       /* Inline zones are always dynamic. */
+       if (zone->type == dns_zone_master && zone->raw != NULL)
+               return (ISC_TRUE);
+
        /* If !ignore_freeze, we need check whether updates are disabled.  */
        if (zone->type == dns_zone_master &&
            (!zone->update_disabled || ignore_freeze) &&
@@ -1965,7 +1969,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
                 * zone being reloaded.  Do nothing - the database
                 * we already have is guaranteed to be up-to-date.
                 */
-               if (zone->type == dns_zone_master)
+               if (zone->type == dns_zone_master && !hasraw)
                        result = DNS_R_DYNAMIC;
                else
                        result = ISC_R_SUCCESS;
@@ -2008,7 +2012,6 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
                        goto cleanup;
                }
 
-
                /*
                 * If the file modification time is in the past
                 * set loadtime to that value.
@@ -4643,6 +4646,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                                isc_uint32_t serialmin, serialmax;
 
                                INSIST(zone->type == dns_zone_master);
+                               INSIST(zone->raw == NULL);
 
                                if (serial == oldserial &&
                                    zone_unchanged(zone->db, db, zone->mctx)) {