On 19-02-15 20:39, HAKNER J wrote:
Working with version 2.2.6, two questions about rlm_perl, perhaps these belong on the developers list?
1: Why is this module unable to set items on the CONFIG list? Looking in the source code rlm_perl.c at function rlmperl_call, the hashes RAD_REPLY,RAD_CHECK,RAD_CONFIG,RAD_REQUEST,RAD_REQUEST_PROXY and RAD_REQUEST_PROXY_REPLY are all pre-loaded with the value pairs from the corresponding lists before the perl subroutine (e.g. authorize) is called. After the subroutine returns, all of these hashes are examined and the values put back into the radiusd value pairs, except RAD_CONFIG. I have worked around it, but why can't this module do this?
The hashes RAD_CONFIG and RAD_CHECK are actually loaded with the same values. from rlm_perl.c: 697: rad_check_hv = get_hv("RAD_CHECK",1); 698: rad_config_hv = get_hv("RAD_CONFIG",1); 705: perl_store_vps(request->config_items, rad_check_hv); 707: perl_store_vps(request->config_items, rad_config_hv); Later in this function, the value of rad_check_hv is written back: 777: if ((get_hv_content(rad_check_hv, &vp)) > 0 ) { 778: pairfree(&request->config_items); 779: request->config_items = vp; But this does not happen with the RAD_CONFIG/rad_config_hv (if that would happen, we'd have the same problem for RAD_CHECK). RAD_CHECK has been removed in master, but hasn't been backported to 3.0.x because it will break compatibility. A short log of the changes can be found at https://github.com/FreeRADIUS/freeradius-server/pull/715 -- Herwin Weststrate