Using variables in unlang conditions

Alan DeKok aland at deployingradius.com
Fri Feb 25 14:55:25 UTC 2022


On Feb 25, 2022, at 8:28 AM, Rahman Duran <rahman.duran at erzurum.edu.tr> wrote:
> 
> I put it in the authorize section of the default virtual server

  Well, you can't just randomly add things to the "authorize" section.  It won't work.  The configuration file syntax is documented.

> , just
> before if conditions. So this file is not considered a "configuration file"
> :) I just put definitions to the end of the radiusd.conf file, try to start
> in debug mode with freeradius -X, getting the same error:
> 
> ((&Packet-Src-IP-Address < ${etu_aruba_wlc_rektorluk})   ^ Failed to parse
> value for attribute
> 
> bottom of radiusd.conf
> #### VARIABLES  #############################
> etu_aruba_wlc_rektorluk = 10.10.243.0/24
> etu_aruba_wlc_ogrenci_merkezi = 10.10.244.0/24

  OK, after some looking at it, you should put those in "radiusd.conf", just before the "modules {" line.  It should then work.

  Alan DeKok.



More information about the Freeradius-Users mailing list