char *buff[4];
tmpl_rules_t t_rules;
bool use_new_conditions = main_config_migrate_option_get("use_new_conditions");
- bool parse_new_conditions = main_config_migrate_option_get("parse_new_conditions");
/*
* Short names are nicer.
talloc_free(cs);
return NULL;
}
- }
-
- if (parse_new_conditions) {
+ } else {
name2 = buff[3];
}
}
{ FR_CONF_OFFSET("unflatten_after_decode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, unflatten_after_decode) },
{ FR_CONF_OFFSET("unflatten_before_encode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, unflatten_before_encode) },
{ FR_CONF_OFFSET("tmpl_tokenize_all_nested", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, tmpl_tokenize_all_nested) },
- { FR_CONF_OFFSET("parse_new_conditions", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, parse_new_conditions) },
{ FR_CONF_OFFSET("use_new_conditions", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, use_new_conditions) },
{ FR_CONF_OFFSET("rewrite_update", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, rewrite_update) },
{ FR_CONF_OFFSET("forbid_update", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, forbid_update) },
}
static fr_table_num_ordered_t config_arg_table[] = {
- { L("parse_new_conditions"), offsetof(main_config_t, parse_new_conditions) },
{ L("use_new_conditions"), offsetof(main_config_t, use_new_conditions) },
{ L("tmpl_tokenize_all_nested"), offsetof(main_config_t, tmpl_tokenize_all_nested) },
{ L("rewrite_update"), offsetof(main_config_t, rewrite_update) },
bool unflatten_after_decode; //!< the worker will call "unflatten" after protocol decoding
bool unflatten_before_encode; //!< the worker will call "unflatten" before all encoding
bool tmpl_tokenize_all_nested; //!< tmpl_tokenize will create nested tmpls instead of flat ones
- bool parse_new_conditions; //!< the new xlat expressions will be parsed, but not used.
bool use_new_conditions; //!< the new xlat expressions will be used for conditions, instead of the old code
bool rewrite_update; //!< rewrite "update" to be new edit sections
bool forbid_update; //!< forbid "update" sections
/*
* Migration support.
*/
- if (main_config->parse_new_conditions) {
+ if (main_config->use_new_conditions) {
char const *name2 = cf_section_name2(cs);
ssize_t slen;
* If the condition is always false, we don't compile the
* children.
*/
- if (main_config->use_new_conditions) {
- if (is_truthy && !value) goto skip;
+ if (is_truthy && !value) goto skip;
- goto do_compile;
- }
+ goto do_compile;
}
cond = cf_data_value(cf_data_find(cs, fr_cond_t, NULL));
# conditions, so we don't run them under the new conditions.
#
ifneq "$(findstring ${1}, paircmp if-paircmp)" ""
-$(OUTPUT)/${1}: NEW_COND=-S parse_new_conditions=no -S use_new_conditions=no
+$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=no
else ifneq "$(findstring ${1}, comments update-to-edit if-regex-multivalue smash wimax unknown $(KEYWORD_UPDATE_TESTS) vendor_specific vendor_specific.raw xlat-unknown update-proto update-proto-error)" ""
-$(OUTPUT)/${1}: NEW_COND=-S parse_new_conditions=yes -S use_new_conditions=yes
+$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes
else ifneq "$(findstring ${1}, $(KEYWORD_UPDATE_REWRITE_TESTS))" ""
-$(OUTPUT)/${1}: NEW_COND=-S parse_new_conditions=yes -S use_new_conditions=yes -S rewrite_update=yes
+$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes -S rewrite_update=yes
else
-$(OUTPUT)/${1}: NEW_COND=-S parse_new_conditions=yes -S use_new_conditions=yes -S forbid_update=yes
+$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes -S forbid_update=yes
endif
endef
# Migration support. Some of the tests don't run under the new
# conditions, so we don't run them under the new conditions.
#
-$(foreach x, $(filter ldap% sql_%,$(FILES)), $(eval $$(OUTPUT.$(TEST))/$x: NEW_COND=-S parse_new_conditions=no -S use_new_conditions=no))
-$(foreach x, $(filter-out ldap% sql_%,$(FILES)), $(eval $$(OUTPUT.$(TEST))/$x: NEW_COND=-S parse_new_conditions=yes -S use_new_conditions=yes))
+$(foreach x, $(filter ldap% sql_%,$(FILES)), $(eval $$(OUTPUT.$(TEST))/$x: NEW_COND=-S use_new_conditions=no))
+$(foreach x, $(filter-out ldap% sql_%,$(FILES)), $(eval $$(OUTPUT.$(TEST))/$x: NEW_COND=-S use_new_conditions=yes))
#
# Files in the output dir depend on the unit tests
$(eval $(call TEST_BOOTSTRAP))
-# -S parse_new_conditions=yes -S use_new_conditions=yes -S forbid_update=yes
+# -S use_new_conditions=yes -S forbid_update=yes
#
# The dictionaries are in "share", because the server tries to load
#
PROCESS_ARGS := -p test
PROCESS_ARGS += -D $(DIR)/share -d $(DIR)/
-PROCESS_ARGS += -S parse_new_conditions=yes -S use_new_conditions=yes -S forbid_update=yes
+PROCESS_ARGS += -S use_new_conditions=yes -S forbid_update=yes
PROCESS_ARGS += -i $(DIR)/test.attrs -f $(DIR)/test.attrs
$(OUTPUT)/%: $(DIR)/% $(TEST_BIN_DIR)/unit_test_module $(DIR)/unit_test_module.conf