unlang question
Alan DeKok
aland at deployingradius.com
Wed Jul 16 15:50:11 CEST 2008
Norbert Wegener wrote:
> With unlang I achive the following: Check, whether a special VLAN exists
> on a switch and if so, assign it.
...
> To reduce sql queries I want to avoid the second.
> Can I store the result of the first query and use the value to assign
> Tunnel-Private-Group-ID?
Yes. Intermediate variables are possible.
update control {
Tmp-String-0 = "%{sqlquery:SELECT value from ...
}
if (control:Tmp-String-0 != "") {
update reply {
Tunnel-Private-Group-ID = "%{Tmp-String-0}"
...
}
}
Alan DeKok.
More information about the Freeradius-Users
mailing list