unlang 'if' expansion

Arran Cudbard-Bell A.Cudbard-Bell at sussex.ac.uk
Wed Jul 2 00:43:51 CEST 2008


Pshem Kowalczyk wrote:
> Hi,
> 
> We use freeradius 2.0.5, currently for testing. I've encountered a
> weird problem with if expansion:
> 
> config:
> server local_logger {
>         listen {
>                 type = detail
>                 filename = ${radacctdir}/detail_local
>                 load_factor = 20
>         }
>         listen {
>                 type = acct
>                 ipaddr = *
>                 port = 1822
>                 secret = xxxxxx
>         }
> 
>         accounting {
>                 if ("%{Acct-Session-Time}" == 0 &&
> "%{Acct-Delay-Time}" == 0 && "%{Acct-Status-Type}" == "Stop"){
>                         ok
>                 }
>                 else{
>                         sql_localhost
>                 }
>         }
> }
>

Sub conditions need to be bound by parenthesis....

                  if (("%{Acct-Session-Time}" == 0) &&
  ("%{Acct-Delay-Time}" == 0) && ("%{Acct-Status-Type}" == "Stop")){




More information about the Freeradius-Users mailing list