rlm_perl & %RAD_REPLY issue

Max Lock max at natcom.co.nz
Thu Oct 13 20:55:39 CEST 2005


On Thu, 2005-10-13 at 15:14 +0300, Boyan Jordanov wrote:

> You don't need to return a variable just fill the hash and then return 
> RLM_MODULE_OK, and then rlm_perl will take the values from hash and put them 
> in radreply. 

that's what I'm trying to do.

sub authorize { 

my $used_user_octets =
&get_used_octets($RAD_REQUEST{'Stripped-User-Name'});

$unused_user_octets = ($RAD_CHECK{'Max-Daily-Session-Data'} -
$used_user_octets);

&radiusd::radlog(1,"Voucher:$RAD_REQUEST{'Stripped-User-Name'} Used:
$used_user_octets Total:$RAD_CHECK{'Max-Daily-Session-Data'} Left:
$unused_user_octets");

$RAD_REPLY{'ChilliSpot-Max-Total-Octets'} = $unused_user_octets;

return RLM_MODULE_OK;

}

 The log line shows that the variables are all correctly populated.

 -Cheers Max




More information about the Freeradius-Users mailing list