Acct-Type behaviour

Alan Dekok aland at deployingradius.com
Wed May 16 14:23:58 CEST 2007


Milan Holub wrote:
> My "problem" is that if the Acct-Type is set to RELAY then no other
> module from accounting{} gets called except of radrelay-detail. I
> thought that correct behaviour is that all modules from accounting{}
> should be called and if Acct-Type is set to RELAY then radrelay-detail
> should be called as well.

  That is how Acct-Type works.  Only Autz-Type works differently.

> In order to achieve desired behaviour my accounting{} looks now:
> accounting {
>     Acct-Type RELAY {
> 	radrelay-detail
> 	detail
> 	sql
> 	attr_filter.accounting_response
>     }
>     detail
>     sql
>     attr_filter.accounting_response
> }

  You can fix this with configurable failover, I think.  2.0 allows
simple "if/then/else", which lets you do:

 foo  # sets return code
 if RELAY {
	radrelay-detail
 } else {
	detail
 }
 ...

  The "if" works only for module return codes, so it will be awkward to
get it to work.  But it should work after a bit of poking.

  Alan DeKok.
--
  http://deployingradius.com       - The web site of the book
  http://deployingradius.com/blog/ - The blog



More information about the Freeradius-Users mailing list