How to access config parameters for rlm_perl

David Donn david.donn at
Wed Feb 17 05:15:56 CET 2010


I want to set up some config parameters for use in my perl module. I
think these are supposed to be in the RAD_CONFIG hash. But this hash
always seems to be empty.

Any ideas? Maybe I have I have my config parameters defined in the wrong

David Donn

My site file:
accounting {



My rlm_perl config file (from /etc/raddb/modules):
perl example {

        module = ${confdir}/

        foo = bar


My perl code (
use strict;

# use ...
# This is very important ! Without this script will not get the filled
hashesh from main.

use constant    RLM_MODULE_OK=>        2;#  /* the module is OK,
continue */

use constant LOG_ERROR => 4;

sub accounting {

    # doesn't print anything, expected it to print "module =
/etc/raddb/" and "foo = bar"
    foreach my $k (keys %RAD_CONFIG) {
        &radiusd::radlog(LOG_ERROR, "Config $k = $RAD_CONFIG{$k}");
    return RLM_MODULE_OK;

More information about the Freeradius-Users mailing list