diff --git a/bin/tests/system/checkconf/deprecated.conf b/bin/tests/system/checkconf/deprecated.conf index 71ea50eb6c..e90d9469a0 100644 --- a/bin/tests/system/checkconf/deprecated.conf +++ b/bin/tests/system/checkconf/deprecated.conf @@ -30,6 +30,10 @@ options { dnssec-must-be-secure mustbesecure.example yes; sortlist { }; + + rrset-order { + name "fixed.example" order fixed; + }; }; trusted-keys { diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index 76b2986d8d..c995890aaa 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -165,6 +165,12 @@ warnings=$(grep "'notify' is disabled" /dev/null 2>&1; then + test_fixed=true +else + test_fixed=false +fi + n=$((n + 1)) echo_i "checking named-checkconf deprecate warnings ($n)" ret=0 @@ -181,11 +187,16 @@ grep "option 'heartbeat-interval' is deprecated" /dev/null | grep "option 'dnssec-must-be-secure' is deprecated" /dev/null || ret=1 grep "option 'sortlist' is deprecated" /dev/null || ret=1 grep "token 'port' is deprecated" /dev/null || ret=1 +if $test_fixed; then + grep "rrset-order: order 'fixed' is deprecated" /dev/null || ret=1 +else + grep "rrset-order: order 'fixed' was disabled at compilation time" /dev/null || ret=1 +fi if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) # set -i to ignore deprecate warnings -$CHECKCONF -i deprecated.conf >checkconf.out$n.2 2>&1 -grep '.*' /dev/null && ret=1 +$CHECKCONF -i deprecated.conf 2>&1 | grep_v "rrset-order: order 'fixed' was disabled at compilation time" >checkconf.out$n.2 +grep '^.+$' /dev/null && ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index a33fe46570..7a4d12e256 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -650,3 +650,5 @@ parse_openssl_config() { esac done < "$OPENSSL_CONF" } + +grep_v() { grep -v "$@" || test $? = 1; } diff --git a/configure.ac b/configure.ac index 1b1b0cdde2..4a744e103d 100644 --- a/configure.ac +++ b/configure.ac @@ -1203,8 +1203,8 @@ AC_ARG_ENABLE([fixed-rrset], [enable fixed rrset ordering [default=no]])], [], [enable_fixed_rrset="no"]) AS_IF([test "$enable_fixed_rrset" = "yes"], - [AC_DEFINE([DNS_RDATASET_FIXED], [1], - [Define to enable "rrset-order fixed" syntax.])]) + [AC_MSG_WARN([fixed rrset ordering is deprecated and will be removed in the future release]) + AC_DEFINE([DNS_RDATASET_FIXED], [1], [Define to enable "rrset-order fixed" syntax.])]) # # Activate dnstap? diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index dc11db525e..df24019828 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -4132,6 +4132,8 @@ RRset Ordering ``fixed`` Records are returned in the order they are defined in the zone file. + This value is deprecated and will be removed in a future release. + .. note:: The ``fixed`` option is only available if BIND is configured with diff --git a/lib/isccfg/check.c b/lib/isccfg/check.c index 32a3e4fa00..e0c4bdc5b8 100644 --- a/lib/isccfg/check.c +++ b/lib/isccfg/check.c @@ -168,7 +168,12 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) { result = ISC_R_FAILURE; } } else if (strcasecmp(cfg_obj_asstring(obj), "fixed") == 0) { -#if !DNS_RDATASET_FIXED +#if DNS_RDATASET_FIXED + if ((ent->pctx->flags & CFG_PCTX_NODEPRECATED) == 0) { + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "rrset-order: order 'fixed' is deprecated"); + } +#else cfg_obj_log(obj, logctx, ISC_LOG_WARNING, "rrset-order: order 'fixed' was disabled at " "compilation time");