Setting realm from called station id regex
Phil Mayers
p.mayers at imperial.ac.uk
Mon Jul 23 17:29:46 CEST 2012
On 23/07/12 16:03, Christopher Manigan wrote:
> Hello,
>
>
> I have some devices that report to radius accounting but do not do any authentication or authorization. For these sessions in accounting, I would like to set a realm based on the called station id. The called station id ends with a colon and the SSID. I thought I could write a simple regular expression for the ssid and set the realm. Here is what I have right now, but it does not seem to be working:
>
>
>
> DEFAULT Called-Station-Id =~ "myssid"
> Realm = "myrealm"
That's probably updating the reply, which is not even meaningful for
accounting.
You need to use unlang, so that you can specify which variable list to
update. For example:
preacct {
if (Calling-Station-Id =~ /myssid/) {
update request {
Realm := myrealm
}
}
}
More information about the Freeradius-Users
mailing list