RDEBUG("server %s {", cf_section_name2(g->server_cs));
/*
- * @todo - we can't change protocols (e.g. RADIUS ->
- * DHCP) unless we're in a subrequest.
- *
* @todo - we can't change packet types
* (e.g. Access-Request -> Accounting-Request) unless
* we're in a subrequest.
char *packet;
CONF_SECTION *server_cs;
fr_io_process_t *process_p;
+ fr_dict_t const *dict;
vp_tmpl_rules_t parse_rules;
*packet = '.';
packet++;
+ /*
+ * The dictionaries are not compatible, forbid it.
+ */
+ dict = virtual_server_namespace(server);
+ if (dict && (dict != fr_dict_internal) && fr_dict_internal &&
+ unlang_ctx->rules->dict_def && (unlang_ctx->rules->dict_def != dict)) {
+ cf_log_err(cs, "Cannot call namespace '%s' from namespaces '%s'",
+ fr_dict_root(dict)->name, fr_dict_root(unlang_ctx->rules->dict_def)->name);
+ talloc_free(g);
+ return NULL;
+ }
+
/*
* Verify it exists, but don't bother caching it. We can
* figure it out at run-time.