filling in missing attributes
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: rlm_attr_rewrite or use conditional syntax within the sql.conf ie. "%{%{Foo}:-%{Bar}}" Thanks Duane Cox
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.
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
Arran Cudbard-Bell wrote:
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}" } }
For 2.0.1-pre, this should be: if (!NAS-Identifier) { update request { NAS-Identifier = "%{client:shortname}" } } I think it's time to release 2.0.1. There have been a few good bug fixes, and the ability to *not* double-quote everything is a big step forwards. Alan DeKok.
On Tue 22 Jan 2008, Alan DeKok wrote:
I think it's time to release 2.0.1. There have been a few good bug fixes, and the ability to *not* double-quote everything is a big step forwards.
Seems reasonable. -- Peter Nixon http://peternixon.net/
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Duane Cox -
Peter Nixon