rlm_perl not working

Vincent, Fabien fabien.vincent at coreye.fr
Thu Oct 20 15:08:37 CEST 2011

Thanks for your replies.

I want to resolve the Invalid Accounting Packet problem, so I start to write
a perl function preacct like this :

sub preacct {
    # For debugging purposes only
    print "start preacct ***\n";
    print Dumper(%RAD_REQUEST);    print "now update request ***\n";
    $RAD_REQUEST{'Acct-Status-Type'} = 7;
    print "returning from preacct ***\n";

And modify my preacct using perl.

I entered correctly into this procedure, but I didn't know how to update
NAS-IP-Address using Packet-Src-IP-Address into the perl sub. 

Is there somewhere some documentation to have all var in one webpage ?

If someone has an example on how to update $RAD_REQUEST{'NAS-IP-Address'}
using rlm_perl is welcome ;)



-----Message d'origine-----
De : freeradius-users-bounces+fabien.vincent=coreye.fr at lists.freeradius.org
[mailto:freeradius-users-bounces+fabien.vincent=coreye.fr at lists.freeradius.o
rg] De la part de Alan Buxey
Envoyé : mardi 18 octobre 2011 21:31
À : FreeRadius users mailing list
Objet : Re: rlm_perl not working


> > Of course ! But to simplify documentation, I've put all in one file
radiusd.conf except sql requests / config
>   That's a terrible idea.

I was going to say the same thing.  the old old server used to use a single
file for config...that
was actually a nasty thing. it now calls seperate modules....which all have
nice notes/comments
in them already. redacting that to a single flat file is horrible....even
worse, it makes looking
at the difference between your server config and the next release available
config - eg new options
etc almost impossible.

> >         NAS-IP-Address =
> >         F5-Acct = "Oct 18 17:18:59 local/lb2b notice mcpd[4820]:
01070417:5: AUDIT - user radtest - transaction #40213784-2 - object 0 -
modify { pool_member { pool_member_pool_name \"......
> >   WARNING: Empty section.  Using default return values.
> > +- entering group accounting {...}
> > Invalid Accounting Packet

rlm_perl prints that out if there is no "Acct-Status-Type" attribute in the
packet - ie
its not really a nice valid accounting packet. this looks like auditing
packets being sent...
they might need to fix their code?

> > And one more question, can I replace it dynamically with, for example,
rlm_perl using the IP address from sender host (here ?).

replace what? the NAS-IP-Address? yes - you can swap it with eg the

List info/subscribe/unsubscribe? See

Ce message a ete verifie par MailScanner.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3746 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20111020/5d35d7e6/attachment.bin>

More information about the Freeradius-Users mailing list