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.
This commit is contained in:
Matthijs Mekking 2020-12-08 11:26:08 +01:00
parent ef28737af8
commit ff1957e95b
3 changed files with 8 additions and 24 deletions

View file

@ -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
/*%

View file

@ -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 }
};

View file

@ -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;