How to access this attribute

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Oct 17 20:19:43 CEST 2013


On 17 Oct 2013, at 19:01, Scott Armitage <S.P.Armitage at LBORO.AC.UK> wrote:

> 
> On 17 Oct 2013, at 18:58, <A.L.M.Buxey at lboro.ac.uk> wrote:
> 
>> Hi,
>>> On Thu, Oct 17, 2013 at 03:17:09PM +0100, Jonathan Gazeley wrote:
>>>> This is a simple question but I can't find the answer by searching.
>>>> In the following rad_recv block, which variable contains the value
>>>> "137.222.7.113"? I need to access it in unlang to determine whether
>>>> the packet arrived at my RADIUS server from our wireless
>>>> controllers, or from another RADIUS server.
>>> 
>>> It's a virtual attribute - use Packet-Src-IP-Address or
>>> Client-IP-Address.
>> 
>> if you have nicely defined shortnames in your clients.conf you can also use
>> 
>> %{client:shortname} too ...
>> 
>> eg 
>> 
>> if (%{client:shortname} != "NRPS") 
>> 	{
>> 		blah blah
>> 	}
>> 
>> etc etc
> 
> 
> you could shortcut that further 
> 
> if (%C != "NRPS")
> 
> etc etc
> 

Except that's deprecated.

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team



More information about the Freeradius-Users mailing list