RLM_Perl not seeing huntgroup-name

Graeme Hinchliffe graeme.hinchliffe at zeninternet.co.uk
Mon May 19 13:36:34 CEST 2014

I just tried changing the line in the huntgroups file from:

Testhunt    Client-IP-Address


Testhunt    NAS-IP-Address

And this seemed to make the huntgroup be selected!  However on the vanilla FreeRADIUS install, it is configured with Client-IP-Address of and selecting the huntgroup.

I am using radclient -f testuser auth testing123  to send the test packet, On both setups freeradius is seeing the request come from:

rad_recv: Access-Request packet from host port 34345, id=153, length=48
	User-Name = "testuser"
	User-Password = "kdsjhfksf"

On the non-working config we then get:

+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop

But on the working (vanilla FreeRADIUS config)

+- entering group authorize {...}
[preprocess] 	expand: %{Client-IP-Address} ->
++[preprocess] returns ok

I suspect preprocess isn't working correctly on the non-vanilla setup for some reason, I have md5'd both versions of the preprocess configuration file and they are identical, I have also ensured that preprocess appears in the same places within the site configuration.

When I change the huntgroup files to use NAS-IP-Address, there is still nothing other than:

++[preprocess] returns ok

But the huntgroup appears within RLM_Perl.

Any ideas?



-----Original Message-----
From: freeradius-users-bounces+graeme.hinchliffe=zeninternet.co.uk at lists.freeradius.org [mailto:freeradius-users-bounces+graeme.hinchliffe=zeninternet.co.uk at lists.freeradius.org] On Behalf Of Graeme Hinchliffe
Sent: 19 May 2014 12:12
To: FreeRadius users mailing list
Subject: RE: RLM_Perl not seeing huntgroup-name

        I have done some further testing.  Fresh install of FreeRADIUS 2.1.12 (Debian package).  I have made only minor changes to the config (I added perl after preprocess in Authorization section of the default server, and added a testhuntgroup).

I have then added a small perl module which simply dumps the output of the lists passed to the module and exits with a NO-OP.  When I test an auth request against this I get the following output from freeradius -X

[preprocess]    expand: %{Client-IP-Address} ->
++[preprocess] returns ok
          'User-Name' => 'testuser at test',
          'User-Password' => 'testing',
          'Huntgroup-Name' => 'testhunt',
          'NAS-IP-Address' => ''
CHECK = $VAR1 = {};
REPLY = $VAR1 = {};
CONFIG = $VAR1 = {};
PROXY = $VAR1 = {};
PROXY REP = $VAR1 = {};
rlm_perl: Added pair User-Name = testuser at test
rlm_perl: Added pair User-Password = testing
rlm_perl: Added pair Huntgroup-Name = testhunt
rlm_perl: Added pair NAS-IP-Address =
++[perl] returns noop

So in this instance Huntgroup-Name *is* visible within the perl module as it was in FreeRADIUS 1.x.x  however something is stopping this from occurring on the test platform with the full config.

I am suspecting that for some reason it isn't assigning the Huntgroup to the request, although the test IP address has been assigned one in the huntgroup file, is there a way I could check what, if any hunt group is being selected?  Or do you have any ideas of what may suppress the Huntgroup from appearing in the attributes sent to RLM_Perl ?



-----Original Message-----
From: freeradius-users-bounces+graeme.hinchliffe=zeninternet.co.uk at lists.freeradius.org [mailto:freeradius-users-bounces+graeme.hinchliffe=zeninternet.co.uk at lists.freeradius.org] On Behalf Of Alan DeKok
Sent: 15 May 2014 15:16
To: FreeRadius users mailing list
Subject: Re: RLM_Perl not seeing huntgroup-name

Graeme Hinchliffe wrote:
>                 To confirm this I have added Data::Dumper and dumped 
> the various structures and cannot see it anywhere. The RLM_PERL module 
> is called after preprocess module which returns OK also.

  Huntgroup-Name is a virtual attribute.  You can compare it to something, but you can't read it's value.

  Alan DeKok.
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Graeme Hinchliffe
Senior Designer - Systems, Zen Internet
T: +441706902000
F: +441706902005
W: zen.co.uk

We have reduced our Business Talk SIP and SIP Connect call rates by up to 40%. http://www.zen.co.uk/business/voice/sip-trunking.aspx

This message is private and confidential. If you have received this message in error, please notify us and remove it from your system.

Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or from Zen Internet Limited for the purposes of security, staff training and to monitor quality of service.

Zen Internet Limited is registered in England and Wales, Sandbrook Park, Sandbrook Way, Rochdale, OL11 1RY Company No. 03101568 VAT Reg No. 686 0495 01
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

More information about the Freeradius-Users mailing list