From: Alan T. DeKok Date: Tue, 24 May 2016 21:57:14 +0000 (-0400) Subject: Set request->server_cs if not already set X-Git-Tag: branch_3_1_x~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4df0f8922cf8a87b645c58d15289239678d094c2;p=thirdparty%2Ffreeradius-server.git Set request->server_cs if not already set --- diff --git a/src/main/modules.c b/src/main/modules.c index e4272820468..9d046bc04f4 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -1835,7 +1835,16 @@ static rlm_rcode_t indexed_modcall(rlm_components_t comp, int idx, REQUEST *requ char const *module; char const *component; - rad_assert(request->server_cs != NULL); + /* + * Some modules don't (yet) set this. It's also + * debatable as to whether they should be required to set + * it. + */ + if (!request->server_cs) { + rad_assert(request->server != NULL); + + request->server_cs = cf_section_sub_find_name2(main_config.config, "server", request->server); + } cs = cf_section_sub_find(request->server_cs, section_type_value[comp].section); if (!cs) {