]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Log experimental options
authorMatthijs Mekking <matthijs@isc.org>
Tue, 8 Dec 2020 10:47:57 +0000 (11:47 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 19 Jan 2021 09:12:40 +0000 (10:12 +0100)
Log a warning for the 'experimental' clause flag similar to
the 'deprecated' flag.

lib/isccfg/parser.c

index f4d9ba815add7649d27a0a1c57152ac88eb85613..9fd049553f7f1d11917b1f1917163893e75d6d0b 100644 (file)
@@ -2448,6 +2448,13 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
                                         clause->name);
                        CHECK(ISC_R_FAILURE);
                }
+               if ((clause->flags & CFG_CLAUSEFLAG_NOTCONFIGURED) != 0) {
+                       cfg_parser_error(pctx, 0,
+                                        "option '%s' was not "
+                                        "enabled at compile time",
+                                        clause->name);
+                       CHECK(ISC_R_FAILURE);
+               }
 
                /* Issue warnings if appropriate */
                if ((pctx->flags & CFG_PCTX_NODEPRECATED) == 0 &&
@@ -2462,13 +2469,11 @@ 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_NOTCONFIGURED) != 0) {
-                       cfg_parser_error(pctx, 0,
-                                        "option '%s' was not "
-                                        "enabled at compile time",
-                                        clause->name);
-                       CHECK(ISC_R_FAILURE);
+               if ((clause->flags & CFG_CLAUSEFLAG_EXPERIMENTAL) != 0) {
+                       cfg_parser_warning(pctx, 0,
+                                          "option '%s' is experimental and "
+                                          "subject to change in the future",
+                                          clause->name);
                }
 
                /* See if the clause already has a value; if not create one. */