From d5f70b223748eeca1edab3841fcd9a4a3cfb2819 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Tue, 8 Dec 2020 11:37:46 +0100 Subject: [PATCH] Obsolete CLAUSEFLAG NEWDEFAULT 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 | 3 +-- lib/isccfg/namedconf.c | 2 +- lib/isccfg/parser.c | 7 ------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h index 43947712da..45513d0e46 100644 --- a/lib/isccfg/include/isccfg/grammar.h +++ b/lib/isccfg/include/isccfg/grammar.h @@ -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 diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 007ede844e..b3153d16e7 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -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 }, diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 5d9790c32d..f4d9ba815a 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -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" },