simultaneous use --solved-- :-)

tnt at kalik.co.yu tnt at kalik.co.yu
Wed Sep 26 14:38:35 CEST 2007


That is wrong. You need to update the session to which accounting packet
belongs to, not any open session for that user. It's better to
investigate the source of open sessions and resolve it than to fudge
things like that.

Ivan Kalik
Kalik Informatika ISP.


Dana 26/9/2007, "Michael Ziemann" <mailinglist at ziemann-perl.de> piše:

>Hi all!
>
>I solved my simultaneous-use problems with AcctStopTime 0000-00-00
>00:00:00 ...
>
>The reason was a wrong MySQL-Code in the sql.conf file:
>
>accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime = '%S',
>AcctSessionTime = '%{Acct-Session-Time}',
>
>AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets =
>'%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-
>
>Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}',
>ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId =
>
>'%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress
>= '%{NAS-IP-Address}'"
>
>
>
>I changed it to:
>
># |----->
># | edited by Martin Kirchner & Michael Ziemann | Sep. 2007
># |----->
>
>accounting_stop_query = "UPDATE ${acct_table1} \
>          SET FramedIPAddress = '%{Framed-IP-Address}', \
>          AcctSessionTime = '%{Acct-Session-Time}', \
>          AcctInputOctets = '%{Acct-Input-Octets}', \
>          AcctOutputOctets = '%{Acct-Output-Octets}', \
>      AcctStopTime = FROM_UNIXTIME(UNIX_TIMESTAMP(`AcctStartTime`) +
>`AcctSessionTime` ) \
>          WHERE UserName = '%{SQL-User-Name}' \
>          AND AcctStopTime= '0000-00-00 00:00:00'"
>
>
>Now it works very well... The users can login, but they can't login
>twice at the same time... The accounting works perfect, too...
>
>
>Thanks for the good support and friendly responses.
>
>My project is finished now...
>
>
>Thanks for your patience!
>
>
>Michael Ziemann
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>




More information about the Freeradius-Users mailing list