FreeRadius - Multiple Clients

Casey Daniels mailinglist at cd.kcfam.net
Fri Apr 11 18:49:47 CEST 2014


On 04/09/2014 02:45 AM, Arran Cudbard-Bell wrote:
> On 9 Apr 2014, at 06:30, Casey Daniels <mailinglist at cd.kcfam.net> wrote:
>
> client <wifi> {
> 	nas_type = 'wifi'
> }
>
>
> authorize {
> 	if ("%{client:nas_type}" == 'wifi') {
> 		<do wifi things!>
> 	}
> }
>
> Unfortunately regular expressions are not permitted as the LHS of a check item pair in a users file
> so you have to use unlang, or assign the result of %{client:nas_type} to a temporary attribute
> and use that instead.
>
>
I created a attribute in the user file called wifi_key,  so what would 
the unlang look like to check against that.

I tried

if ("%{wifi_key}" == 'true') {
            <do wifi things>!
}

but with your stated limitation about the LHS, how does someone get 
around that?

Casey


More information about the Freeradius-Users mailing list