Hi everyone,
We noticed that when using MySQL for radius accounting the
Framed-IP-Address was only being inserted into the radacct table for update
packets, not for stop packets. So depending on the configuration of the NAS
you might not get any record of the IP addresses of the users unless of
course you were also logging to a detail file (which is always a good idea
btw.). Anyway, below is a patch for the sql update query.
Best regards,
Ingvar
Ingvar Bjarnason
Network engineer
Iceland telecom
--- sql.orig Fri Nov 1 08:55:08 2002
+++ sql.conf Fri Nov 1 08:54:34 2002
@@ -150,7 +150,7 @@
- accounting_stop_query = "UPDATE ${acct_table1} 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}' AND AcctStopTime = 0"
+ accounting_stop_query = "UPDATE ${acct_table1} 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}', FramedIPAddress
= '%{Framed-IP-Address}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND
UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}' AND
AcctStopTime = 0"
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html