]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
mark max-zone-ttl deprecated in options and zone
authorEvan Hunt <each@isc.org>
Mon, 11 Jul 2022 20:38:51 +0000 (13:38 -0700)
committerEvan Hunt <each@isc.org>
Wed, 20 Jul 2022 18:55:03 +0000 (11:55 -0700)
The "max-zone-ttl" option should now be configured as part of
"dnssec-policy". The option with the same name in "zone" and
"options" is hereby flagged as deprecated, and its functionality
will be removed in a future release.

bin/tests/system/checkconf/deprecated.conf
bin/tests/system/checkconf/tests.sh
doc/arm/reference.rst
doc/man/named.conf.5in
doc/misc/options
doc/misc/primary.zoneopt
doc/misc/redirect.zoneopt
lib/isccfg/namedconf.c

index 44607a042bf963eba4e82d29dac03fcdb95fa7cf..6c092db306b8b7c07e4534db3e6cacc31c7772ac 100644 (file)
@@ -13,6 +13,7 @@
 
 options {
        dnssec-validation yes;
+       max-zone-ttl 600;
 };
 
 trusted-keys {
@@ -36,3 +37,9 @@ managed-keys {
                RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN
                R1AkUTV74bU=";
 };
+
+zone example.com {
+        type primary;
+       file "maxttl-bad.db";
+       max-zone-ttl 120;
+};
index 5d6108ecd24ced2de0ac32ae9d74088b461bbdc4..7d8d50e5cad112377ed73d6370277d7f87d4842d 100644 (file)
@@ -157,6 +157,7 @@ ret=0
 $CHECKCONF deprecated.conf > checkconf.out$n.1 2>&1
 grep "option 'managed-keys' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
 grep "option 'trusted-keys' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
+grep "option 'max-zone-ttl' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 # set -i to ignore deprecate warnings
index 69fddba873ba99344b4c6fe2536ece9e9761be4e..f6fe74916bd0f5eff9dbe8e1aba362195fd24d2c 100644 (file)
@@ -1802,26 +1802,28 @@ default is used.
    The default is five minutes. It cannot be longer than :any:`nta-lifetime`, which
    cannot be longer than a week.
 
-.. namedconf:statement:: max-zone-ttl
+:any:`max-zone-ttl`
 
-   This specifies a maximum permissible TTL value in seconds. For
-   convenience, TTL-style time-unit suffixes may be used to specify the
-   maximum value. When loading a zone file using a :any:`masterfile-format`
-   of ``text`` or ``raw``, any record encountered with a TTL higher than
-   :any:`max-zone-ttl` causes the zone to be rejected.
+   This should now be configured as part of :namedconf:ref:`dnssec-policy`.
+   Use of this option in :namedconf:ref:`options`, :namedconf:ref:`view`
+   and :namedconf:ref:`zone` blocks has no effect on any zone for which
+   a :namedconf:ref:`dnssec-policy` has also been configured. In zones
+   without :namedconf:ref:`dnssec-policy`, this option is deprecated,
+   and will be rendered non-operational in a future release.
+
+   :any:`max-zone-ttl` specifies a maximum permissible TTL value in seconds.
+   For convenience, TTL-style time-unit suffixes may be used to specify the
+   maximum value. When a zone file is loaded, any record encountered with a
+   TTL higher than :any:`max-zone-ttl` causes the zone to be rejected.
 
    This is needed in DNSSEC-maintained zones because when rolling to a new
    DNSKEY, the old key needs to remain available until RRSIG records
    have expired from caches. The :any:`max-zone-ttl` option guarantees that
    the largest TTL in the zone is no higher than the set value.
 
-   In the :namedconf:ref:`options` and :namedconf:ref:`zone` blocks,
-   the default value is ``unlimited``. A :any:`max-zone-ttl` of zero is
-   treated as ``unlimited``.
-
-   In the :namedconf:ref:`dnssec-policy` block,
-   the default value is ``PT24H`` (24 hours).  A :any:`max-zone-ttl` of
-   zero is treated as if the default value were in use.
+   When used in :namedconf:ref:`options`, :namedconf:ref:`view` and
+   :namedconf:ref:`zone` blocks, setting :any:`max-zone-ttl` to zero
+   is equivalent to "unlimited".
 
 .. namedconf:statement:: stale-answer-ttl
 
@@ -4213,9 +4215,9 @@ Tuning
    Note that when a zone file in a format other than ``text`` is loaded,
    :iscman:`named` may omit some of the checks which are performed for a file in
    ``text`` format. For example, :any:`check-names` only applies when loading
-   zones in ``text`` format, and :any:`max-zone-ttl` only applies to ``text``
-   and ``raw``.  Zone files in binary formats should be generated with the
-   same check level as that specified in the :iscman:`named` configuration file.
+   zones in ``text`` format. Zone files in ``raw`` format should be generated
+   with the same check level as that specified in the :iscman:`named`
+   configuration file.
 
    When configured in :namedconf:ref:`options`, this statement sets the
    :any:`masterfile-format` for all zones, but it can be overridden on a
@@ -5982,10 +5984,20 @@ The following options can be specified in a :any:`dnssec-policy` statement:
     This is similar to :any:`signatures-validity`, but for DNSKEY records.
     The default is ``P2W`` (2 weeks).
 
-:any:`max-zone-ttl`
+.. namedconf:statement:: max-zone-ttl
+
+   This specifies the maximum permissible TTL value for the zone.  When
+   a zone file is loaded, any record encountered with a TTL higher than
+   :any:`max-zone-ttl` causes the zone to be rejected.
+
+   This ensures that when rolling to a new DNSKEY, the old key will remain
+   available until RRSIG records have expired from caches. The
+   :any:`max-zone-ttl` option guarantees that the largest TTL in the
+   zone is no higher than a known and predictable value.
+
+   The default value ``PT24H`` (24 hours).  A value of zero is treated
+   as if the default value were in use.
 
-   Like the :namedconf:ref:`max-zone-ttl` zone option, this specifies the maximum
-   permissible TTL value, in seconds, for the zone.
 
 .. namedconf:statement:: nsec3param
 
@@ -6779,6 +6791,8 @@ Zone Options
 
 :any:`max-zone-ttl`
    See the description of :any:`max-zone-ttl` in :ref:`options`.
+   The use of this option in :any:`zone` blocks is deprecated and
+   will be rendered nonoperational in a future release.
 
 :any:`dnssec-secure-to-insecure`
    See the description of :any:`dnssec-secure-to-insecure` in :ref:`boolean_options`.
index 2fc6bd1eb7b4fc7d9ac7d9a85cd9e334438a8d94..cbc565134c5aed9da418f379e20701ca09cb59f3 100644 (file)
@@ -247,7 +247,7 @@ options {
        max\-transfer\-time\-in <integer>;
        max\-transfer\-time\-out <integer>;
        max\-udp\-size <integer>;
-       max\-zone\-ttl ( unlimited | <duration> );
+       max\-zone\-ttl ( unlimited | <duration> ); // deprecated
        memstatistics <boolean>;
        memstatistics\-file <quoted_string>;
        message\-compression <boolean>;
@@ -534,7 +534,7 @@ view <string> [ <class> ] {
        max\-transfer\-time\-in <integer>;
        max\-transfer\-time\-out <integer>;
        max\-udp\-size <integer>;
-       max\-zone\-ttl ( unlimited | <duration> );
+       max\-zone\-ttl ( unlimited | <duration> ); // deprecated
        message\-compression <boolean>;
        min\-cache\-ttl <duration>;
        min\-ncache\-ttl <duration>;
@@ -703,7 +703,7 @@ zone <string> [ <class> ] {
        max\-records <integer>;
        max\-transfer\-idle\-out <integer>;
        max\-transfer\-time\-out <integer>;
-       max\-zone\-ttl ( unlimited | <duration> );
+       max\-zone\-ttl ( unlimited | <duration> ); // deprecated
        notify ( explicit | master\-only | primary\-only | <boolean> );
        notify\-delay <integer>;
        notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
@@ -902,7 +902,7 @@ zone <string> [ <class> ] {
        masterfile\-format ( raw | text );
        masterfile\-style ( full | relative );
        max\-records <integer>;
-       max\-zone\-ttl ( unlimited | <duration> );
+       max\-zone\-ttl ( unlimited | <duration> ); // deprecated
        primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
        zone\-statistics ( full | terse | none | <boolean> );
 };
index 37558e36da1870a52aa015970d92d2563ccc14d0..1681be1514a4fb09f7156721705471d2c42a8353 100644 (file)
@@ -190,7 +190,7 @@ options {
        max-transfer-time-in <integer>;
        max-transfer-time-out <integer>;
        max-udp-size <integer>;
-       max-zone-ttl ( unlimited | <duration> );
+       max-zone-ttl ( unlimited | <duration> ); // deprecated
        memstatistics <boolean>;
        memstatistics-file <quoted_string>;
        message-compression <boolean>;
@@ -477,7 +477,7 @@ view <string> [ <class> ] {
        max-transfer-time-in <integer>;
        max-transfer-time-out <integer>;
        max-udp-size <integer>;
-       max-zone-ttl ( unlimited | <duration> );
+       max-zone-ttl ( unlimited | <duration> ); // deprecated
        message-compression <boolean>;
        min-cache-ttl <duration>;
        min-ncache-ttl <duration>;
index c8ceb6d29fd92570779bbee8ac441e79e38c1246..5501962f4ce0300670bb237e0ed52fa77d8b09d4 100644 (file)
@@ -40,7 +40,7 @@ zone <string> [ <class> ] {
        max-records <integer>;
        max-transfer-idle-out <integer>;
        max-transfer-time-out <integer>;
-       max-zone-ttl ( unlimited | <duration> );
+       max-zone-ttl ( unlimited | <duration> ); // deprecated
        notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index 1c34bb11f19625f3a50733a12866b8b6d684b990..845ca96062ea6d090439438149fe6e4a928813a2 100644 (file)
@@ -7,7 +7,7 @@ zone <string> [ <class> ] {
        masterfile-format ( raw | text );
        masterfile-style ( full | relative );
        max-records <integer>;
-       max-zone-ttl ( unlimited | <duration> );
+       max-zone-ttl ( unlimited | <duration> ); // deprecated
        primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
        zone-statistics ( full | terse | none | <boolean> );
 };
index a438fe1f5e61b55ead51148849c5f05f86774861..64d0ddb494febf824f183b12a6fde1c7fc85b30c 100644 (file)
@@ -2300,7 +2300,7 @@ static cfg_clausedef_t zone_clauses[] = {
        { "max-transfer-time-out", &cfg_type_uint32,
          CFG_ZONE_PRIMARY | CFG_ZONE_MIRROR | CFG_ZONE_SECONDARY },
        { "max-zone-ttl", &cfg_type_maxduration,
-         CFG_ZONE_PRIMARY | CFG_ZONE_REDIRECT },
+         CFG_ZONE_PRIMARY | CFG_ZONE_REDIRECT | CFG_CLAUSEFLAG_DEPRECATED },
        { "min-refresh-time", &cfg_type_uint32,
          CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
        { "min-retry-time", &cfg_type_uint32,