]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Obsolete CLAUSEFLAG NEWDEFAULT
authorMatthijs Mekking <matthijs@isc.org>
Tue, 8 Dec 2020 10:37:46 +0000 (11:37 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 19 Jan 2021 09:12:40 +0000 (10:12 +0100)
The 'new default' option was introduced in 2002 to signal that a
default option had changed its default value, in this specific case
the value for 'auth-nxdomain'. However, this default has been unchanged
for 18 years now, and logging that the default has changed does not
have significant value nowadays.

This is also a good example that the clause flag 'new default' is
broken: it is easy to get out of date.

It is also easy to forget, because we have changed the default value
for 'max-stale-ttl' and haven't been flagging it with 'new default'

Also, if the operator cares for a specific value it should set it
explicitly. Using the default is telling the software: use whatever
you think is best, and this may change over time. Default value
changes should be mentioned in the release note, but do not require
further special treatment.

lib/isccfg/include/isccfg/grammar.h
lib/isccfg/namedconf.c
lib/isccfg/parser.c

index 43947712da29df9f2eac3c11d79093351381b2a6..45513d0e4655e743cc5cf765f887b5195cb0320e 100644 (file)
@@ -36,8 +36,7 @@
 #define CFG_CLAUSEFLAG_OBSOLETE 0x00000002
 /* obsolete: #define CFG_CLAUSEFLAG_NOTIMP 0x00000004 */
 /* obsolete: #define CFG_CLAUSEFLAG_NYI 0x00000008 */
-/*% Default value has changed since earlier release */
-#define CFG_CLAUSEFLAG_NEWDEFAULT 0x00000010
+/* obsolete: #define CFG_CLAUSEFLAG_NEWDEFAULT 0x00000010 */
 /*%
  * Clause needs to be interpreted during parsing
  * by calling a callback function, like the
index 007ede844e54cb6fd019e3225bce6c78756200c3..b3153d16e78cebf3eca0cffbbe45aec3cab5cda8 100644 (file)
@@ -1973,7 +1973,7 @@ static cfg_clausedef_t view_clauses[] = {
        { "allow-v6-synthesis", &cfg_type_bracketed_aml,
          CFG_CLAUSEFLAG_OBSOLETE },
        { "attach-cache", &cfg_type_astring, 0 },
-       { "auth-nxdomain", &cfg_type_boolean, CFG_CLAUSEFLAG_NEWDEFAULT },
+       { "auth-nxdomain", &cfg_type_boolean, 0 },
        { "cache-file", &cfg_type_qstring, 0 },
        { "catalog-zones", &cfg_type_catz, 0 },
        { "check-names", &cfg_type_checknames, CFG_CLAUSEFLAG_MULTI },
index 5d9790c32d3f1131b47cbfe79a4b44bbca436468..f4d9ba815add7649d27a0a1c57152ac88eb85613 100644 (file)
@@ -2471,12 +2471,6 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
                        CHECK(ISC_R_FAILURE);
                }
 
-               /*
-                * Don't log options with CFG_CLAUSEFLAG_NEWDEFAULT
-                * set here - we need to log the *lack* of such an option,
-                * not its presence.
-                */
-
                /* See if the clause already has a value; if not create one. */
                result = isc_symtab_lookup(obj->value.map.symtab, clause->name,
                                           0, &symval);
@@ -2707,7 +2701,6 @@ static struct flagtext {
        unsigned int flag;
        const char *text;
 } flagtexts[] = { { CFG_CLAUSEFLAG_OBSOLETE, "obsolete" },
-                 { CFG_CLAUSEFLAG_NEWDEFAULT, "default changed" },
                  { CFG_CLAUSEFLAG_TESTONLY, "test only" },
                  { CFG_CLAUSEFLAG_NOTCONFIGURED, "not configured" },
                  { CFG_CLAUSEFLAG_MULTI, "may occur multiple times" },