reference packet code in unlang?
    Alan DeKok 
    aland at deployingradius.com
       
    Tue Apr 22 16:17:03 CEST 2008
    
    
  
Arran Cudbard-Bell wrote:
> Stefan Winter wrote:
> |> if (Acct-Status-Type == "Accounting-Off" && !(Acct-Session-Id =~
  You should have brackets around this:  if ((foo == "bar") && ...
> Parse error in condition at: Acct-Status-Type == "Accounting-Off" &&
> !(Acct-Session-Id =~ /restena.*/)) update control {
  Did I mention that the parser is crap?
>> if (("%{Acct-Status-Type}" ==  'Accounting-Off') &&
  Brackets are good, but "%{foo}" is not necessary.
>> * Regular expressions have always been <attribute> ~= /<expr>/[<mod>]
> 
>> * Attribute expansion always used to be "%{[<list>:]<attribute>}" but I
>> understand Alan changed that, though I thought he only deprecated the
>> double quotes part not the percent curly braces wrapper... but don't
>> take my word for it.
  See "man unlang".  This is explained.
>> * Strings you don't want to be expanded should be encapsulated in single
>> quotes not double.
> 
>> * You can't do <condition><operation> on the same line
> 
>> * Sub conditions should be encapsulated in parenthesis
  That was the original parse error.
  Alan DeKok.
    
    
More information about the Freeradius-Users
mailing list