duplicate acctuniqueid problem
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Jun 4 15:06:26 CEST 2015
> On 4 Jun 2015, at 05:02, d tbsky <tbskyd at gmail.com> wrote:
>
> Hi:
> I am testing 802.1x accounting under fr 3.0.8. steps below:
>
> 1. use my notebook to login AP. accounting begin.
> 2. poweroff/poweron the AP. AP send "Accounting on". and previous
> accounting log closed with "NAS-Reboot".that's good.
> 3. use my notebook to login AP. fr can not create a new accounting
> entry, it seems "Acct-Session-Id" will be reused and cause
> "acctuniqueid" duplicate. error message like below:
>
> (11) sql: rlm_sql_mysql: ERROR 1062 (Duplicate entry
> 'e8db0ea9accf3a44b835ff8a0e5b62c0' for key 'acctuniqueid'): 23000
> (11) sql: SQL query returned: need alt query
> (11) sql: Trying next query...
> (11) sql: EXPAND UPDATE radacct SET acctstarttime =
> FROM_UNIXTIME(%{integer:Event-Timestamp})...................
>
> then fr will try to update an existing entry instead of log a new entry.
>
> is the behavior expected? how can I setup to prevent it?
FreeRADIUS is behaving as expected. But you've got insufficient attributes in your acct_unique_id policy to ensure the value is unique.
One trick you can do is send back a class attribute with a random value on authentication, and then use that as part of the acct_unique_id.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150604/8e44e91b/attachment.sig>
More information about the Freeradius-Users
mailing list