diff --git a/src/app/config/config.c b/src/app/config/config.c
index c15236b0e9..5f7a82d15a 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -259,11 +259,11 @@ DUMMY_TYPECHECK_INSTANCE(or_options_t);
* or_options_t.member"
*/
#define VAR(varname,conftype,member,initvalue) \
- CONFIG_VAR_ETYPE(or_options_t, varname, conftype, member, initvalue)
+ CONFIG_VAR_ETYPE(or_options_t, varname, conftype, member, 0, initvalue)
/* As VAR, but uses a type definition in addition to a type enum. */
#define VAR_D(varname,conftype,member,initvalue) \
- CONFIG_VAR_DEFN(or_options_t, varname, conftype, member, initvalue)
+ CONFIG_VAR_DEFN(or_options_t, varname, conftype, member, 0, initvalue)
#define V(member,conftype,initvalue) \
VAR(#member, conftype, member, initvalue)
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index e0584c62af..4fe415b8cf 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -71,7 +71,7 @@ static config_abbrev_t state_abbrevs_[] = {
DUMMY_TYPECHECK_INSTANCE(or_state_t);
#define VAR(varname,conftype,member,initvalue) \
- CONFIG_VAR_ETYPE(or_state_t, varname, conftype, member, initvalue)
+ CONFIG_VAR_ETYPE(or_state_t, varname, conftype, member, 0, initvalue)
#define V(member,conftype,initvalue) \
VAR(#member, conftype, member, initvalue)
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index 3cdb223d25..d89f249a72 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -52,7 +52,7 @@ static const char dstate_cur_srv_key[] = "SharedRandCurrentValue";
DUMMY_TYPECHECK_INSTANCE(sr_disk_state_t);
#define VAR(varname,conftype,member,initvalue) \
- CONFIG_VAR_ETYPE(sr_disk_state_t, varname, conftype, member, initvalue)
+ CONFIG_VAR_ETYPE(sr_disk_state_t, varname, conftype, member, 0, initvalue)
#define V(member,conftype,initvalue) \
VAR(#member, conftype, member, initvalue)
diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h
index 4242137c5a..ff284e681d 100644
--- a/src/lib/conf/confmacros.h
+++ b/src/lib/conf/confmacros.h
@@ -30,12 +30,14 @@
* Most modules that use this macro should wrap it in a local macro that
* sets structtype to the local configuration type.
**/
-#define CONFIG_VAR_ETYPE(structtype, varname, vartype, membername, initval) \
+#define CONFIG_VAR_ETYPE(structtype, varname, vartype, membername, \
+ varflags, initval) \
{ .member = \
{ .name = varname, \
.type = CONFIG_TYPE_ ## vartype, \
.offset = offsetof(structtype, membername), \
}, \
+ .flags = varflags, \
.initvalue = initval \
CONF_TEST_MEMBERS(structtype, vartype, membername) \
}
@@ -44,13 +46,15 @@
* As CONFIG_VAR_XTYPE, but declares a value using an extension type whose
* type definition is vartype_type_defn.
**/
-#define CONFIG_VAR_DEFN(structtype, varname, vartype, membername, initval) \
+#define CONFIG_VAR_DEFN(structtype, varname, vartype, membername, \
+ varflags, initval) \
{ .member = \
- { .name = varname, \
+ { .name = varname, \
.type = CONFIG_TYPE_EXTENDED, \
.type_def = &vartype ## _type_defn, \
.offset = offsetof(structtype, membername), \
}, \
+ .flags = varflags, \
.initvalue = initval \
CONF_TEST_MEMBERS(structtype, vartype, membername) \
}
diff --git a/src/test/test_confparse.c b/src/test/test_confparse.c
index 4bf66f3230..4612419dff 100644
--- a/src/test/test_confparse.c
+++ b/src/test/test_confparse.c
@@ -49,7 +49,7 @@ typedef struct test_struct_t {
static test_struct_t test_struct_t_dummy;
#define VAR(varname,conftype,member,initvalue) \
- CONFIG_VAR_ETYPE(test_struct_t, varname, conftype, member, initvalue)
+ CONFIG_VAR_ETYPE(test_struct_t, varname, conftype, member, 0, initvalue)
#define V(member,conftype,initvalue) \
VAR(#member, conftype, member, initvalue)
#define OBSOLETE(varname) \