Due to some network problems today, my FreeRadius 1.1.0 server and NAS
(wrt54g+Chilli) had 
problems with duplicate accounting packets. The NAS sent a Start packet, the
reply from the radius server did not reach and the NAS sent it again.
I got up to 3 identical rows in the radacct table.

To avoid this I changed the 'AcctUniqueId' column to UNIQUE and it seems to
work fine.

I just get an error message in my debug log and instead of an INSERT an
UPDATE is done.
Tue Mar 21 04:36:46 2006 : Debug: rlm_sql_mysql: query:  INSERT into
Tue Mar 21 04:36:46 2006 : Debug: rlm_sql_mysql: MYSQL check_error: 1062
received
Tue Mar 21 04:36:46 2006 : Error: rlm_sql (sql): Couldn't insert SQL
accounting START record - Duplicate entry 'af40ee210a7c0400' for key 2
Tue Mar 21 04:36:46 2006 : Debug: radius_xlat:  'UPDATE ...

That is exactly what I need.

If the Start packet is able to write 3 identical rows, all Interim-Updates
are written
to the 3 rows. That means my prepaid cards are running off the time three
times faster.

I also tried ... INSERT (.....) ON DUPLICATE KEY UPDATE ...., but it seems
not
to be necessary.

Are there any implications setting the 'AcctUniqueId' column to UNIQUE?


Gunther




- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to