rlm_perl and accounting

Justin Church jcc at unc.edu
Tue Aug 22 22:51:57 CEST 2006

I see the patch you're referring to, but after rethinking my question, I 
think what I'm really trying to do is rewrite $RAD_REQUEST, not 
$RAD_REPLY, and it does not appear that I can alter $RAD_REQUEST in any 
way - either change or add.  If I understand correctly, $RAD_REPLY is 
the hash of attributes that the server will send back to the NAS, and 
$RAD_REQUEST is the hash of attributes that is actually written when the 
detail module is called.  My goal is to inspect the received attributes 
using rlm_perl in the preacct{} phase before they are written to log in 
the accounting{} phase and possibly remove/rewrite/add attributes before 
they are logged.  Is this possible with rlm_perl?

Also, I've observed that the freeradius will not start when my 
example.pl script contains use Data::Dumper;  It looks as if others have 
had this problem when their perl was not compiled with ITHREADS support, 
but my perl does have ITHREADS support, and neither perl -c 
-MData::Dumper nor perl example.pl returns an error.

jcc at black-pearl:~/scripts$ perl -v
This is perl, v5.8.7 built for i486-linux-gnu-thread-multi

jcc at black-pearl:~/scripts$ perl -V | grep ITHREADS



Alex French wrote:
> Yes, this is due to the way rlm_perl works by default (new pairs can be 
> added but existing ones not changed). Look back a week or so in the 
> mailing list archives to the problem I was having. There is a patch on 
> the list that will allegedly make it into HEAD. The patch works nicely 
> for me.
> Alex
> On 22/08/06, *Justin Church* <jcc at unc.edu <mailto:jcc at unc.edu>> wrote:
>     I'm running freeradius v. 1.1.0 and am trying to use rlm_perl to rewrite
>     accounting attributes before they are written to log with detail and
>     then replicated with radrelay.  Here is the version of example.pl that
>     I'm using (I've only added a single statement to the preacct function):
> ------------------------------------------------------------------------
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

More information about the Freeradius-Users mailing list