Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-29 Thread Alan DeKok
Matthias Nagel wrote: This is correct, if one has some kind of key to identify a session that could be used as a database index. But unfortunately there are a lot of authenticators out there, that do not correctly generate radius accounting session ids. Basicly I see three different types

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-29 Thread Phil Mayers
On 08/28/2012 05:26 PM, Matthias Nagel wrote: is incomplete, i.e. it only has as start time. The latter never will be completed, because the stop message has already been processed and acknowledged to the authenticator. Aside from anything else - you need to handle this case. Accounting is

Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Matthias Nagel
Hello everybody, if two accounting messages for the same session are sent by the authenticator very quickly, the messages may be processed by the radius server in the wrong order. This results into two sessions being accounted instead of one. The second phantom session stays open for ever,

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Alan DeKok
Matthias Nagel wrote: if two accounting messages for the same session are sent by the authenticator very quickly, the messages may be processed by the radius server in the wrong order. This results into two sessions being accounted instead of one. The second phantom session stays open for

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Fajar A. Nugraha
On Wed, Aug 29, 2012 at 4:11 AM, Alan DeKok al...@deployingradius.com wrote: Matthias Nagel wrote: 5) Thread #2 terminates first and the accounting stop message is written to the PostgreSQL database. The SQL UPDATE statement fails, because there is no entry for this session that could be

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Matthias Nagel
Hello, Am Dienstag 28 August 2012, 23:11:57 schrieb Alan DeKok: Matthias Nagel wrote: if two accounting messages for the same session are sent by the authenticator very quickly, the messages may be processed by the radius server in the wrong order. This results into two sessions being

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Arran Cudbard-Bell
Yes yes RADIUS vendors should go die in a big fiery pit somewhere. 1) Verify your NAS supports the Class attribute correctly (http://www.ietf.org/rfc/rfc2865.txt 5.25) 2) Implement the policies in raddb/policy.d/accounting (master:HEAD) 3) Submit patch to add unique index constraint on

Re: Bug/Enhancement request: Race condition with short-term accounting (FreeRadius 2.1.10)

2012-08-28 Thread Arran Cudbard-Bell
On 28 Aug 2012, at 23:05, Matthias Nagel matthias.h.na...@gmail.com wrote: Hello, Am Dienstag 28 August 2012, 23:11:57 schrieb Alan DeKok: Matthias Nagel wrote: if two accounting messages for the same session are sent by the authenticator very quickly, the messages may be processed by