Double-up of radacct entries anmd radacct entries with UserName empty

Hanno Schupp hanno.schupp at gmail.com
Thu Jul 8 20:49:11 CEST 2010


Dear All,

I am running freeradius 2.10 with mysql for some time now, currently on
Ubuntu 9.10, 
NASes are various router models running Openwrt and Coova-Chilli.

I am having trouble with my radacct table. Which creates some 80k entries
per annum. For about 1% of users it contains doubled up entries (entries
with same AcctSessionId and same AcctUniqueId) and also lots of entries with
the Username being empty (as opposed to either filled or Null).


Example extract from radacct:

RadAcctId	AcctSessionId	AcctUniqueId	UserName	Realm
NASIPAddress	NASPortId	NASPortType	AcctStartTime	AcctStopTime
AcctSessionTime	AcctAuthentic	ConnectInfo_start	ConnectInfo_stop
AcctInputOctets	AcctOutputOctets	CalledStationId	CallingStationId
AcctTerminateCause	ServiceType	FramedProtocol	FramedIPAddress
AcctStartDelay	AcctStopDelay	xascendsessionsvrkey
202678	4c2c5c7200000002	b50051a7f2d0e210	jasdoxur7
192.168.182.1	2	Wireless-802.11	2010-07-01 21:14:47	2010-07-02
01:12:18	14251	 	 	 	8100124	28550967
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.25	0	0	 
203366	4c2ce6de00000001	584e51b205634c34	jasdoxur7
192.168.182.1	1	Wireless-802.11	2010-07-02 07:10:24	2010-07-02
10:38:35	12491	 	 	 	8620576	48189131
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.2	0	0	 
203370	4c2ce6de00000001	584e51b205634c34	jasdoxur7
192.168.182.1	1	Wireless-802.11	2010-07-02 07:10:24	2010-07-02
10:38:35	12491	 	 	 	8620576	48189131
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.2	0	0	 
203374	4c2ce6de00000001	584e51b205634c34	jasdoxur7
192.168.182.1	1	Wireless-802.11	2010-07-02 07:10:24	2010-07-02
10:38:35	12491	 	 	 	8620576	48189131
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.2	0	0	 
203378	4c2ce6de00000001	584e51b205634c34	jasdoxur7
192.168.182.1	1	Wireless-802.11	2010-07-02 07:10:24	2010-07-02
10:38:35	12491	 	 	 	8620576	48189131
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.2	0	0	 
204458	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:33	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
204462	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:33	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
204466	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:33	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
204470	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:33	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
204474	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:33	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
204478	4c2dd9a900000006	e3dbcb6e1e8d44dc	jasdoxur7
192.168.182.1	6	Wireless-802.11	2010-07-03 00:26:34	2010-07-03
01:28:16	3702	 	 	 	6564061	23169066
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	User-Request
192.168.182.28	0	0	 
205110	4c2e6be700000002	1bbe9ab0e9e6321b	jasdoxur7
192.168.182.1	2	Wireless-802.11	2010-07-03 10:54:33	2010-07-03
11:14:45	1212	 	 	 	585059	2206797
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Lost-Carrier
192.168.182.6	0	0	 
205950	4c2f201400000007	390a572eaaf851c9	jasdoxur7
192.168.182.1	7	Wireless-802.11	2010-07-03 23:37:55	2010-07-04
00:13:48	2153	 	 	 	4465894	50532205
00-15-6D-DA-E0-59	00-13-02-89-7D-8E	Session-Timeout
192.168.182.23			


Here an extract of the sqltrace.log, which shows how the UserName is empty:

           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6120',
acctinputoctets     = '0'  << 32 |
'16465104',              acctoutputoctets    = '0' << 32 |
'23727469'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '16200',
acctinputoctets     = '0'  << 32 |
'182914',              acctoutputoctets    = '0' << 32 |
'433400'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '16202',
acctinputoctets     = '0'  << 32 |
'996451',              acctoutputoctets    = '0' << 32 |
'1129794'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6300',
acctinputoctets     = '0'  << 32 |
'16584022',              acctoutputoctets    = '0' << 32 |
'25293355'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '16380',
acctinputoctets     = '0'  << 32 |
'186746',              acctoutputoctets    = '0' << 32 |
'438333'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '16382',
acctinputoctets     = '0'  << 32 |
'1008639',              acctoutputoctets    = '0' << 32 |
'1151346'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6480',
acctinputoctets     = '0'  << 32 |
'16587316',              acctoutputoctets    = '0' << 32 |
'25294477'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6480',
acctinputoctets     = '0'  << 32 |
'16587316',              acctoutputoctets    = '0' << 32 |
'25294477'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '16560',
acctinputoctets     = '0'  << 32 |
'187646',              acctoutputoctets    = '0' << 32 |
'438707'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '16562',
acctinputoctets     = '0'  << 32 |
'1019098',              acctoutputoctets    = '0' << 32 |
'1160739'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6660',
acctinputoctets     = '0'  << 32 |
'16588043',              acctoutputoctets    = '0' << 32 |
'25295061'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '16740',
acctinputoctets     = '0'  << 32 |
'187820',              acctoutputoctets    = '0' << 32 |
'438707'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '16742',
acctinputoctets     = '0'  << 32 |
'1030191',              acctoutputoctets    = '0' << 32 |
'1183588'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '6840',
acctinputoctets     = '0'  << 32 |
'16588711',              acctoutputoctets    = '0' << 32 |
'25295510'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '16920',
acctinputoctets     = '0'  << 32 |
'187820',              acctoutputoctets    = '0' << 32 |
'438707'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '16922',
acctinputoctets     = '0'  << 32 |
'1053695',              acctoutputoctets    = '0' << 32 |
'1198212'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '7020',
acctinputoctets     = '0'  << 32 |
'16589356',              acctoutputoctets    = '0' << 32 |
'25295598'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '17100',
acctinputoctets     = '0'  << 32 |
'187820',              acctoutputoctets    = '0' << 32 |
'438707'           WHERE acctsessionid = '4c321df600000001'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.3',              acctsessiontime     = '17102',
acctinputoctets     = '0'  << 32 |
'1065444',              acctoutputoctets    = '0' << 32 |
'1226533'           WHERE acctsessionid = '4c321e0000000003'           AND
username        = ''           AND nasipaddress    = '192.168.182.1';
           UPDATE radacct           SET              framedipaddress =
'192.168.182.2',              acctsessiontime     = '7200',
acctinputoctets     = '0'  << 32 |
'16591820',              acctoutputoctets    = '0' << 32 |
'25298149'           WHERE acctsessionid = '4c32447800000001'           AND
username        = 'gencafot7'           AND nasipaddress    =
'192.168.182.1';

My sql statements are standard dialup.conf, with Simultaneous Use Checking
Queries and Case Sensitive User queries switched on.

What could cause the doubled up radacct entries and what might cause the
empty UserName radacct updates?

Any advice welcome.

Thanks




More information about the Freeradius-Users mailing list