Alan DeKok wrote:
Duane Cox wrote:
Hello List
I'm looking for a suggested solution to this problem.
I'm running freeradius 2.0.0 and have a NAS that doesn't supply the
NAS-Identifier or Called-Station-Id.
I'm using rlm_sql to log acct information and would like to have this missing
info filled in.
Would it be best to use:
"unlang" will likely make it simpler. It means that you separate the
checks for missing attributes from the SQL configuration.
Putting "%{%{Foo}:-%{Bar}}" in sql.conf quickly gets complicated.
Instead, do:
if (!Foo) {
update request {
Foo = ...
}
}
And then just put "%{Foo}" in sql.conf.
Alan DeKok.
If you require a string identifier for your NAS, you can use the
Client-Shortname attribute in the request list. This just reflects the
shortname assigned to the NAS using rlm_sql or in client definitions.
if(!"%{NAS-Identifier}"){
update request {
NAS-Identifier = "%{client-shortname}"
}
}
See http://wiki.freeradius.org/Run-time_variables
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html