[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: multiple same records ...
From:       Igor Chen <cron () office ! lintec ! com ! ua>
Date:       2002-03-28 18:40:53
[Download RAW message or body]

On Thu, 28 Mar 2002, Do-Risika RAFIEFERANTSIARONJY wrote:

>
> I have some multiple same records in my radacct table, with the same
> username, sessionid, uniqueid, ... so i has to run a script to check
> these multiple records.
>
> To avoid this, I want to modify the UniqueId column into 'unique index',
> so freeradius wouldn't be able to add existing record anymore. Would it
> change the freeradius normal function ? (because it should produce error
> in mysql)
>
> Has anybody already experienced this ?
>
> I use freeradius 0.4 with mysql,
>
Yep, i had. I use freeradius 0.4-snapshot with postgresql and proxy radius
(ancient cistron :-) i even do not know version, cause it belongs to ther
ISP which allows our users to login from their nas'es)
I thought it was proxy (cistron's) problem :-\
The problem seems to be unsolveable... cause i can not create really
UNIQUE key. I've added
acct_unique {
                key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address,
NAS-Port-Id, Event-Timestamp"
        }
to radiusd.conf but only Event-Timestamp can be unique (I'm wrong or
rlm_acct_unique ignores that attribute :-\ ), other attributes can
coincide (Acct-Session-Id is set to zero after each cisco NAS reload).
I wrote two triggers that check insert queries (acc. Start) for coinciding
acctuniqueid in a period of last 48 hours and check update queries
(acc. Stop) for already stopped sessions. :) Of course, i could make
acctuniqueid field unique, but that would affect only Start queries, and
only if all existing values in field were unique (they were not, cause we
had not been not using rlm_acct_unique initially).

I know that's not the best solution, and i would be happy to hear another
point of view.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic