unlang parsing
Chris Moules
chris at gms.lu
Tue Feb 3 15:07:58 CET 2009
I have just come across an oddity in the unlang parsing. I though that I had some form of logic error, but it turned out to be
white space.
I had some unlang code, like the following:
---
if (condition) {
update control {
Attrib1 := "value1"
}
} else {
update control {
Attrib2 := "value2"
}
}
---
Starting FreeRADIUS in debug gave me the error:
---
/etc/freeradius/sites-enabled/radius3[91]: Too many closing braces
Errors reading /etc/freeradius/radiusd.conf
---
Restructuring the code the to following, however, works fine.
---
if (condition) {
update control {
Attrib1 := "value1"
}
}
else {
update control {
Attrib2 := "value2"
}
}
---
The difference is just the newline after the closing 'if' brace.
I had a look for this being mentioned in the man page but did not see anything, except my previous micro-patch.
If this known and/or documented?
Chris
More information about the Freeradius-Devel
mailing list