]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
deprecate dscp configuration
authorEvan Hunt <each@isc.org>
Mon, 9 Jan 2023 22:40:51 +0000 (14:40 -0800)
committerEvan Hunt <each@isc.org>
Tue, 10 Jan 2023 19:16:18 +0000 (11:16 -0800)
This commit deprecates the "dscp" configuration option and "dscp"
parameters to source-address configuration options (query-source,
transfer-source, etc.

(Note that the DSCP feature has not been fully operational since
the network manager was introduced in 9.16.0; outgoing DSCP values
can be configured, but incoming DSCP values are not detected.)

bin/tests/system/checkconf/tests.sh
doc/misc/options
doc/misc/options.active
lib/isccfg/namedconf.c
lib/isccfg/parser.c

index a92fb41dcdf32af71cacfe91a5b67ac0ff052ff8..d625fd5aeb428df1ada96debf765d4f2b99ee8c6 100644 (file)
@@ -408,6 +408,7 @@ n=`expr $n + 1`
 echo_i "check that named-checkconf -l prints out the zone list ($n)"
 ret=0
 $CHECKCONF -l good.conf |
+grep -v "is deprecated" |
 grep -v "is not implemented" |
 grep -v "is not recommended" |
 grep -v "no longer exists" |
index 0994525160fbf36900cf9d34fdc83adcbecc9ae2..f57399499a501096e3f7860847a6de63a2d555f8 100644 (file)
@@ -177,7 +177,7 @@ options {
             <size> ) ] [ versions ( unlimited | <integer> ) ] [ suffix (
             increment | timestamp ) ];
         dnstap-version ( <quoted_string> | none );
-        dscp <integer>;
+        dscp <integer>; // deprecated
         dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port
             <integer> ] [ dscp <integer> ] | <ipv4_address> [ port
             <integer> ] [ dscp <integer> ] | <ipv6_address> [ port
index 068545fa293c1cb4cf692c3f2e7ece2d7d1f25c4..5fc1ab29f42b41cfdb7533ec9496dd3d0efc3ef5 100644 (file)
@@ -163,7 +163,7 @@ options {
             <size> ) ] [ versions ( unlimited | <integer> ) ] [ suffix (
             increment | timestamp ) ];
         dnstap-version ( <quoted_string> | none );
-        dscp <integer>;
+        dscp <integer>; // deprecated
         dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port
             <integer> ] [ dscp <integer> ] | <ipv4_address> [ port
             <integer> ] [ dscp <integer> ] | <ipv6_address> [ port
index f482b35514f79343c674a0114a07df4393956b34..45de0196bf451012805a6d68169f3e2a21ddb19e 100644 (file)
@@ -149,7 +149,7 @@ static cfg_type_t cfg_type_tkey_dhkey = { "tkey-dhkey",        cfg_parse_tuple,
 
 static cfg_tuplefielddef_t listenon_fields[] = {
        { "port", &cfg_type_optional_port, 0 },
-       { "dscp", &cfg_type_optional_dscp, 0 },
+       { "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_DEPRECATED },
        { "acl", &cfg_type_bracketed_aml, 0 },
        { NULL, NULL, 0 }
 };
@@ -173,7 +173,7 @@ static cfg_type_t cfg_type_acl = { "acl",       cfg_parse_tuple,
 static cfg_tuplefielddef_t remotes_fields[] = {
        { "name", &cfg_type_astring, 0 },
        { "port", &cfg_type_optional_port, 0 },
-       { "dscp", &cfg_type_optional_dscp, 0 },
+       { "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_DEPRECATED },
        { "addresses", &cfg_type_bracketed_namesockaddrkeylist, 0 },
        { NULL, NULL, 0 }
 };
@@ -211,7 +211,7 @@ static cfg_type_t cfg_type_bracketed_namesockaddrkeylist = {
 
 static cfg_tuplefielddef_t namesockaddrkeylist_fields[] = {
        { "port", &cfg_type_optional_port, 0 },
-       { "dscp", &cfg_type_optional_dscp, 0 },
+       { "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_DEPRECATED },
        { "addresses", &cfg_type_bracketed_namesockaddrkeylist, 0 },
        { NULL, NULL, 0 }
 };
@@ -226,7 +226,7 @@ static cfg_type_t cfg_type_namesockaddrkeylist = {
  */
 static cfg_tuplefielddef_t portiplist_fields[] = {
        { "port", &cfg_type_optional_port, 0 },
-       { "dscp", &cfg_type_optional_dscp, 0 },
+       { "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_DEPRECATED },
        { "addresses", &cfg_type_bracketed_dscpsockaddrlist, 0 },
        { NULL, NULL, 0 }
 };
@@ -1178,7 +1178,7 @@ static cfg_clausedef_t options_clauses[] = {
        { "dnstap-version", &cfg_type_qstringornone,
          CFG_CLAUSEFLAG_NOTCONFIGURED },
 #endif /* ifdef HAVE_DNSTAP */
-       { "dscp", &cfg_type_uint32, 0 },
+       { "dscp", &cfg_type_uint32, CFG_CLAUSEFLAG_DEPRECATED },
        { "dump-file", &cfg_type_qstring, 0 },
        { "fake-iquery", &cfg_type_boolean, CFG_CLAUSEFLAG_ANCIENT },
        { "files", &cfg_type_size, 0 },
@@ -3150,6 +3150,12 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
                                have_port++;
                        } else if (strcasecmp(TOKEN_STRING(pctx), "dscp") == 0)
                        {
+                               if ((pctx->flags & CFG_PCTX_NODEPRECATED) == 0)
+                               {
+                                       cfg_parser_warning(
+                                               pctx, 0,
+                                               "token 'dscp' is deprecated");
+                               }
                                /* read "dscp" */
                                CHECK(cfg_gettoken(pctx, 0));
                                CHECK(cfg_parse_dscp(pctx, &dscp));
@@ -3596,7 +3602,7 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_sessionkey = {
 static cfg_tuplefielddef_t nameport_fields[] = {
        { "name", &cfg_type_astring, 0 },
        { "port", &cfg_type_optional_port, 0 },
-       { "dscp", &cfg_type_optional_dscp, 0 },
+       { "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_DEPRECATED },
        { NULL, NULL, 0 }
 };
 
index bf0959c8481c6778de6ca99a2b06518db619ceb6..4ba93ee288130ee8e3462200dc2bd3d396fd3b4c 100644 (file)
@@ -3470,6 +3470,12 @@ parse_sockaddrsub(cfg_parser_t *pctx, const cfg_type_t *type, int flags,
                        } else if ((flags & CFG_ADDR_DSCPOK) != 0 &&
                                   strcasecmp(TOKEN_STRING(pctx), "dscp") == 0)
                        {
+                               if ((pctx->flags & CFG_PCTX_NODEPRECATED) == 0)
+                               {
+                                       cfg_parser_warning(
+                                               pctx, 0,
+                                               "token 'dscp' is deprecated");
+                               }
                                CHECK(cfg_gettoken(pctx, 0)); /* read "dscp" */
                                CHECK(cfg_parse_dscp(pctx, &dscp));
                                ++have_dscp;