From: Arran Cudbard-Bell Date: Fri, 30 Nov 2018 12:42:16 +0000 (-0500) Subject: Assign the RADIUS dictionary to requests in unit_test_module X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6fcdeec8a33df9bee2c70a5eb408695e324eaa7;p=thirdparty%2Ffreeradius-server.git Assign the RADIUS dictionary to requests in unit_test_module This is needed for runtime attribute resolution to work correctly. --- diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 9ded3f3c5ff..35c16716d8d 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -179,6 +179,17 @@ static REQUEST *request_from_file(FILE *fp, fr_event_list_t *el, RADCLIENT *clie request = request_alloc(NULL); gettimeofday(&now, NULL); + /* + * FIXME - Should be less RADIUS centric, but everything + * else assumes RADIUS at the moment so we can fix this later. + */ + request->dict = fr_dict_by_protocol_name("radius"); + if (!request->dict) { + ERROR("RADIUS dictionary failed to load"); + talloc_free(request); + return NULL; + } + request->packet = fr_radius_alloc(request, false); if (!request->packet) { ERROR("No memory");