Unlang and variables
Ti Ti
tt91em at gmail.com
Thu Sep 28 21:50:50 CEST 2017
Hello,
I'm using unlang to discriminate the database to use as described in the
code below.
Is there a method to use variables so avoid the redundant check of NAS-Id?
Thanks
server rad {
listen {
ipaddr = *
port = 1812
type = auth
}
listen {
ipaddr = *
port = 1813
type = acct
}
authorize {
if (&NAS-Identifier =~ /test/i) {
db1
}
if (&NAS-Identifier =~ /test2/i) {
db2
}
}
accounting {
if (&NAS-Identifier =~ /test/i) {
db1
}
if (&NAS-Identifier =~ /test2/i) {
db2
}
}
session {
if (&NAS-Identifier =~ /test/i) {
db1
}
if (&NAS-Identifier =~ /test2/i) {
db2
}
}
}
More information about the Freeradius-Users
mailing list