From ff1957e95b0db4b8c7b5c0f08602e5c3d4cc14fe Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Tue, 8 Dec 2020 11:26:08 +0100 Subject: [PATCH] Obsolete CLAUSEFLAG NOTIMP and NYI The clause flags 'not implented' and 'not implemented yet' are the same as 'obsoleted' when it comes to behavior. These options will now be treated similar as obsoleted (the idea being that if an option is implemented it should be functional). The new options for DoT are new options and rather than flagging them obsolete, they should have been flagged as experimental, signalling that these options are subject to change in the future. --- lib/isccfg/include/isccfg/grammar.h | 6 ++---- lib/isccfg/namedconf.c | 10 +++++----- lib/isccfg/parser.c | 16 +--------------- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h index b17406eb32..7c234ab8c5 100644 --- a/lib/isccfg/include/isccfg/grammar.h +++ b/lib/isccfg/include/isccfg/grammar.h @@ -34,10 +34,8 @@ #define CFG_CLAUSEFLAG_MULTI 0x00000001 /*% Clause is obsolete (logs a warning, but is not a fatal error) */ #define CFG_CLAUSEFLAG_OBSOLETE 0x00000002 -/*% Clause is not implemented, and may never be */ -#define CFG_CLAUSEFLAG_NOTIMP 0x00000004 -/*% Clause is not implemented yet */ -#define CFG_CLAUSEFLAG_NYI 0x00000008 +/* obsolete: #define CFG_CLAUSEFLAG_NOTIMP 0x00000004 */ +/* obsolete: #define CFG_CLAUSEFLAG_NYI 0x00000008 */ /*% Default value has changed since earlier release */ #define CFG_CLAUSEFLAG_NEWDEFAULT 0x00000010 /*% diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index ceb9a02229..b17b978c5c 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -2088,7 +2088,8 @@ static cfg_clausedef_t view_clauses[] = { { "stale-answer-ttl", &cfg_type_duration, 0 }, { "stale-cache-enable", &cfg_type_boolean, 0 }, { "stale-refresh-time", &cfg_type_duration, 0 }, - { "suppress-initial-notify", &cfg_type_boolean, CFG_CLAUSEFLAG_NYI }, + { "suppress-initial-notify", &cfg_type_boolean, + CFG_CLAUSEFLAG_OBSOLETE }, { "synth-from-dnssec", &cfg_type_boolean, 0 }, { "topology", &cfg_type_bracketed_aml, CFG_CLAUSEFLAG_ANCIENT }, { "transfer-format", &cfg_type_transferformat, 0 }, @@ -3830,7 +3831,6 @@ cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags, if (((pctx.flags & CFG_PRINTER_ACTIVEONLY) != 0) && (((clause->flags & CFG_CLAUSEFLAG_OBSOLETE) != 0) || ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) || - ((clause->flags & CFG_CLAUSEFLAG_NYI) != 0) || ((clause->flags & CFG_CLAUSEFLAG_TESTONLY) != 0))) { continue; @@ -3863,9 +3863,9 @@ static cfg_type_t cfg_type_sslprotos = { static cfg_clausedef_t tls_clauses[] = { { "key-file", &cfg_type_qstring, 0 }, { "cert-file", &cfg_type_qstring, 0 }, - { "dh-param", &cfg_type_qstring, CFG_CLAUSEFLAG_NOTIMP }, - { "protocols", &cfg_type_sslprotos, CFG_CLAUSEFLAG_NOTIMP }, - { "ciphers", &cfg_type_astring, CFG_CLAUSEFLAG_NOTIMP }, + { "dh-param", &cfg_type_qstring, CFG_CLAUSEFLAG_EXPERIMENTAL }, + { "protocols", &cfg_type_sslprotos, CFG_CLAUSEFLAG_EXPERIMENTAL }, + { "ciphers", &cfg_type_astring, CFG_CLAUSEFLAG_EXPERIMENTAL }, { NULL, NULL, 0 } }; diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 565b976b76..9d13d0186e 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -2462,16 +2462,6 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { "should be removed ", clause->name); } - if ((clause->flags & CFG_CLAUSEFLAG_NOTIMP) != 0) { - cfg_parser_warning(pctx, 0, - "option '%s' is not implemented", - clause->name); - } - if ((clause->flags & CFG_CLAUSEFLAG_NYI) != 0) { - cfg_parser_warning(pctx, 0, - "option '%s' is not implemented", - clause->name); - } if ((clause->flags & CFG_CLAUSEFLAG_NOOP) != 0) { cfg_parser_warning(pctx, 0, "option '%s' was not " @@ -2723,9 +2713,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) { static struct flagtext { unsigned int flag; const char *text; -} flagtexts[] = { { CFG_CLAUSEFLAG_NOTIMP, "not implemented" }, - { CFG_CLAUSEFLAG_NYI, "not yet implemented" }, - { CFG_CLAUSEFLAG_OBSOLETE, "obsolete" }, +} flagtexts[] = { { CFG_CLAUSEFLAG_OBSOLETE, "obsolete" }, { CFG_CLAUSEFLAG_NEWDEFAULT, "default changed" }, { CFG_CLAUSEFLAG_TESTONLY, "test only" }, { CFG_CLAUSEFLAG_NOTCONFIGURED, "not configured" }, @@ -2766,7 +2754,6 @@ cfg_doc_mapbody(cfg_printer_t *pctx, const cfg_type_t *type) { if (((pctx->flags & CFG_PRINTER_ACTIVEONLY) != 0) && (((clause->flags & CFG_CLAUSEFLAG_OBSOLETE) != 0) || ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) || - ((clause->flags & CFG_CLAUSEFLAG_NYI) != 0) || ((clause->flags & CFG_CLAUSEFLAG_TESTONLY) != 0))) { continue; @@ -2821,7 +2808,6 @@ cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type) { if (((pctx->flags & CFG_PRINTER_ACTIVEONLY) != 0) && (((clause->flags & CFG_CLAUSEFLAG_OBSOLETE) != 0) || ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) || - ((clause->flags & CFG_CLAUSEFLAG_NYI) != 0) || ((clause->flags & CFG_CLAUSEFLAG_TESTONLY) != 0))) { continue;