Matching a prefix in huntgroups file

A.L.M.Buxey at lboro.ac.uk A.L.M.Buxey at lboro.ac.uk
Sun Nov 6 19:33:09 CET 2016


Hi,

> foo {
>   if (10.254.1.1 == 10.254.0.0/16) {
>     update {
>       Tmp-String-0 := "AAA"
>     }
>   }
>   update {
>     request:NAS-IP-Address := 10.254.1.1
>   }
>   if (&NAS-IP-Address == 10.254.0.0/16) {
>     update {
>       Tmp-String-1 := "BBB"
>     }
>   }
> }

given that you are mapping particular IP addresses as clients with particular needs, surely
this will be easier just to add a local custom tag to the client definition instead and thus you
can leave your foo policy alone....  eg add  my_group to the client definition and then

 foo {
     update {
       Tmp-String-0 := &client:my_group
     }
   }

...as example....then your tmp-string-0 is exactly what that custom tag in the clients.conf is.
(this sort of thing often done if you have eg default return vlan or QoS class for particular
NAS or groups of NAS)

alan


More information about the Freeradius-Users mailing list