From: Alan T. DeKok Date: Tue, 6 Jan 2015 19:07:05 +0000 (-0500) Subject: If we can't load DHCP, complain. Closes #869 X-Git-Tag: release_3_0_7~337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a0bda61f28cb5c8b997dd6dd5f7622019acdaa5;p=thirdparty%2Ffreeradius-server.git If we can't load DHCP, complain. Closes #869 --- diff --git a/src/main/listen.c b/src/main/listen.c index 21680dba5c2..dcd66384683 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -2812,7 +2812,7 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server) talloc_set_destructor(marker, _free_proto_handle); if (master_listen[type].magic != RLM_MODULE_INIT) { - ERROR("Failed to load protocol '%s' due to internal sanity check problem", + ERROR("Failed to load protocol '%s', it has the wrong version.", master_listen[type].name); return NULL; } @@ -2837,6 +2837,15 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server) return NULL; } + /* + * DHCP and VMPS *must* be loaded dynamically. + */ + if (master_listen[type].magic != RLM_MODULE_INIT) { + ERROR("Cannot load protocol '%s', as the required library does not exist", + master_listen[type].name); + return NULL; + } + /* * Allow listen sections in the default config to * refer to a server. @@ -2882,7 +2891,6 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server) return NULL; } - server_cs = cf_section_sub_find_name2(main_config.config, "server", this->server); if (!server_cs && this->server) {