[RADIATOR] Session database sql statement query

Hugh Irvine hugh at open.com.au
Fri Aug 22 00:31:12 CDT 2008


Hello Alex -

Comments below.

On 21 Aug 2008, at 22:25, Alex Sharaz wrote:

> I've got a quick question about Sessiondatabase sql configurations
>

OK

> I've defined a <SessionDatabase SQL> statement that gets called when
> radiator receives a dot1x accounting stop record.
>

Understood.

> In the definition I have a DeleteQuery statement, an AddQuery  
> statement and
> a ClearNasQuery statement.
>

The DeleteQuery is run when an access request is received and when an  
accounting stop is received.

The AddQuery is run when the accounting start is received.

The ClearNasQuery is run when an accounting on is received.

> Basically I have a database table that keeps track of the currently
> authenticated users through the use of accounting start,stop and alive
> packets. When I receive a stop record I want to
> a). Delete the record in my online table
> b). Insert the final set of accounting details as found in the  
> accounting
> stop record into another database table.
>

To do this you should probably use one or more AuthBy SQL clauses  
with one or more AcctSQLStatements.

See section 5.29.18 in the Radiator 4.3.1 reference manual ("doc/ 
ref.pdf").

>
> As far as i can see, the AddQuery statement seems to be ignored. The
> DeleteQuery statement is being obeyed though.
>

See above.

> Shouldn't the sequence be deletequery and then addquery? Elsewhere  
> I use a
> ReplaceQuery statement and i know that if its present radiator  
> doesn't use
> the Add.. and Del.. combination
>

See section 5.8 in the manual.

regards

Hugh


> Alex
>
>
>
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator



NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/ 
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
Have you checked the RadiusExpert wiki:
http://www.open.com.au/wiki/index.php/Main_Page

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.




More information about the radiator mailing list