Hello Ginés -
On Thu, 12 Oct 2000, Ginés Gómez wrote:
> Hi everybody,
> first of all my name is gines and this is my first email to this
> mailing list. The question I've got is as follows:
>
> When processing an Accounting Start or Stop request you can make
> several queries to a database by adding <AuthBy SQL> clauses. NO
> worries. The problem appears when I want to make several queries when
> processing an Auth record. If I specificy several <AuthBy SQL> clauses
> radiator always expects to get some results. Some queries I want to do
> in the authorization stage are UPDATES so I have no results to map to
> PASSWORD or any other Radius Attributes. I want to do an update to the
> RADPOOL table to change the state of the new YIADDR to 2 instead of
> 1.¿Why?
>
This has been discussed on the list several times, so I suggest you have a look
at the archive site:
http://www.starport.net/~radiator
> It has happenned in our production environment that the NAS server sends
> hundreds of Auth records not followed by any Start or Stop records,
> since the IP gets locked in the Auth stage we get many IP addresses
> locked with no further Stop record to unlock them. We've thougt we could
> set the state of the YIADDR to 2 instead of 1 and then change it back to
> 1 in the Start Accounting process. Meanwhile a cronted script would
> update the YIADDR with 2 state to 0 if the TimeStamp is less than 1
> minute ago (Auth and Start shouldn't be more than 2 or 3 seconds away
> one from each other). This way we can unlock IP's locked because of an
> Auth record without Start and Stop.
>
One word of caution in doing this - if you miss a Start record, you will free a
used address and possibly re-allocate it, thereby causing lots of routing
problems.
In any case, probably the best way to do this is with a stored procedure if
your database supports stored procedures. Otherwise, you can use a PostAuthHook
to call additional AuthBy SQL clauses. There are some example hooks in the file
"goodies/hooks.txt" in the distribution.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.