On Tue, Jun 03, 2003 at 12:14:58PM -0500, Chris Parker wrote:
> At 09:05 PM 6/3/2003 +0400, Alexander M. Pravking wrote:
> >> There is no 'wrong' or 'right'. They simply do it different ways.
> >
> >So is it possible to make freeradius determine both?
>
> For what purpose? What do you want Freeradius to do?
When freeradius receives a request, it checks if there was already
a request with same id/nas/udp-port a little time ago (cleanup_delay
in radiusd.conf) or is being processed now. If it was, it re-sends the
reply to NAS if the request was already processed, or otherwise simply
drops retransmitted request "due to live request id NNN".
Right?
It would be nice if freeradius did the same when ids are different, but
Acct-Session-Id's are the same. Don't know if it's a good idea...
Well, I can make it within sql module by doing something like
acct_stop_query = "\
INSERT INTO ${acct_table} \
(username, ...) \
VALUES (
SELECT '%u' WHERE NOT EXISTS ( \
SELECT 1 FROM ${acct_table} \
WHERE userName = '%u' \
AND sessionId = '%{Acct-Session-Id}' \
AND nasIpAddress = '%n' \
AND nasPort = '%{NAS-Port}' \
AND <it-is-OPEN-session> \
), \
...
)"
assuming userName declared as NOT NULL, so the INSERT will fail in case
of re-sent packet and successfully processed original packet.
Thanks all for the input, let's consider the problem solved...
unless someone offers another solution :)
--
Fduch M. Pravking
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html