//!< for modules.
module_method_t methods[MOD_COUNT]; //!< Pointers to the various section callbacks.
module_method_names_t const *method_names; //!< named methods
+ fr_dict_t **dict; //!< pointer to local fr_dict_t*
};
/** Per instance data
unlang_t *c;
unlang_module_t *single;
+ /*
+ * Can't use "chap" in "dhcp".
+ */
+ if (inst->module->dict && *inst->module->dict && unlang_ctx->rules && unlang_ctx->rules->dict_def &&
+ (unlang_ctx->rules->dict_def != fr_dict_internal) &&
+ (*inst->module->dict != unlang_ctx->rules->dict_def)) {
+ cf_log_err(ci, "The \"%s\" module can only used with 'namespace = %s'. It cannot be used with 'namespace = %s'.",
+ inst->module->name,
+ fr_dict_root(*inst->module->dict)->name,
+ fr_dict_root(unlang_ctx->rules->dict_def)->name);
+ return NULL;
+ }
+
/*
* Check if the module in question has the necessary
* component.
.name = "chap",
.inst_size = sizeof(rlm_chap_t),
.bootstrap = mod_bootstrap,
+ .dict = &dict_radius,
.methods = {
[MOD_AUTHENTICATE] = mod_authenticate,
[MOD_AUTHORIZE] = mod_authorize,