Would like to stop Interim Accounting being proxied
Hi all, I need to stop proxying Interim Accounting for a particular domain on our legacy Freeradius 1.1.2 platform. Reading the unlang man page, I've tried: accounting { if ( ("%{Acct-Status-Type}" = "Interim-Update") && ("%{User-Name}" =~ "/@domain/") ) { update control { Proxy-To-Realm := LOCAL } } } But that causes the daemon to error out with "/etc/raddb/radiusd.conf[1433]: Line is not in 'attribute = value' format" What have I misunderstood? Steve
Steve Brown wrote:
Reading the unlang man page, I've tried:
accounting {
if ( ("%{Acct-Status-Type}" = "Interim-Update") && ("%{User-Name}" =~ "/@domain/") ) {
That's wrong on a number of levels. The documentation says you can just refer to an attribute by name. And use '==': if ((Acct-Status-Type == Interim-Update) && (User-Name =~ /@domain/)) { ... }
But that causes the daemon to error out with "/etc/raddb/radiusd.conf[1433]: Line is not in 'attribute = value' format"
What have I misunderstood?
Double-check line 1433? Alan DeKok.
Hi Alan, Thanks for the pointer. This is actually what I started with :( I still get the error "Error: /etc/raddb/radiusd.conf[1433]: Line is not in 'attribute = value' format"; line 1433 is this actual 'if ((' line. accounting { if ((Acct-Status-Type == Interim-Update) && (User-Name =~ /@docomo/)) { update control { Proxy-To-Realm := LOCAL } } } On 28/06/12 13:32, Alan DeKok wrote:
That's wrong on a number of levels. The documentation says you can just refer to an attribute by name. And use '==':
if ((Acct-Status-Type == Interim-Update)&& (User-Name =~ /@domain/)) { ... }
Steve
Steve Brown wrote:
Thanks for the pointer. This is actually what I started with :(
I still get the error "Error: /etc/raddb/radiusd.conf[1433]: Line is not in 'attribute = value' format"; line 1433 is this actual 'if ((' line.
It works for me. Check that you're using version 2? It looks like you're using version 1. "Unlang" is only supported in version 2. Upgrade. Alan DeKok.
On 28/06/12 14:03, Alan DeKok wrote:
Check that you're using version 2? It looks like you're using version 1. "Unlang" is only supported in version 2.
I'm not, and that would explain it nicely; I mentioned in my initial message "legacy Freeradius 1.1.2 platform". Is there any way of achieving the same end result in v1.x without Unlang? Upgrade is some time away, so this is is what we have to work with. Steve
On 28/06/12 14:34, Steve Brown wrote:
Is there any way of achieving the same end result in v1.x without Unlang?
If there was a way to simply respond to an accounting request with an 'Accept', like you can with Auth, could I do something like: acct_users: DEFAULT Acct-Status-Type == Interim-Update, User-Name =~ /@domain/ Acct-Type := "IGNORE" radiusd.conf: accounting { Acct-Type IGNORE { Accept } } Can't find a method like 'Accept' in the docs though so maybe that's not possible. Steve
On 28/06/12 17:13, Steve Brown wrote:
On 28/06/12 14:34, Steve Brown wrote:
Is there any way of achieving the same end result in v1.x without Unlang?
If there was a way to simply respond to an accounting request with an 'Accept', like you can with Auth, could I do something like:
You might be able do use the "configurable_failover" in 1.x to achieve this. Something like: preacct { files { ok = return } ... rest of modules ... } ...and in your "files" module, something like you had: DEFAULT Acct-Status-Type == Interim-Update, User-Name =~ "@domain" Fall-Through = No See "doc/configurable_failover" - from the version of the server you are running, obviously.
Steve Brown wrote:
I'm not, and that would explain it nicely; I mentioned in my initial message "legacy Freeradius 1.1.2 platform". Is there any way of achieving the same end result in v1.x without Unlang?
Unlang isn't in 1.1.x, and is *documented* as not being in 1.1.x. You can't just try random things in the server.
Upgrade is some time away, so this is is what we have to work with.
Upgrade. Alan DeKok.
participants (3)
-
Alan DeKok -
Phil Mayers -
Steve Brown