On Fri, Dec 24, 2004 at 09:39:58AM -0200, Luiz Gustavo Anflor Pereira wrote: > I am using freeradius 1.0.1.
> Let me try to understand. If a client loses its connection, we can use radzap > to > comunicate with the NAS. Then it sends back a stop packet, and the login is > released. Is that correct? No. When you use radzap, it reads the radutmp file and uses the data in it to construct an Accounting STOP packet, which it sends to the RADIUS server, so the RADIUS server can do all its processing as if the NAS had sent the STOP packet. The NAS is totally unaware, as we are assuming the NAS _does_ think the session is released already, most likely due to a lost STOP packet from the NAS. (Otherwise, there may be a different bug to fix eg. mismatching numbers somewhere.) > But due to session_id is too long, it is not working. To fix it, we can use > the > mysql function RIGHT(%{Acct-Session-Id}, 8). But in which query? I ended up with accounting_stop_query changing WHERE AcctSessionId = '%{Acct-Session-Id}' to WHERE AcctSessionId LIKE CONCAT('%%','%{Acct-Session-Id}') for reasons that escape me, compared to RIGHT(%{Acct-Session-Id}, 8). I think the difference was that using RIGHT assumed the length, while what I actually did does a substring match against the end of the stored AcctSessionId. > And if we use it, the checkrad is gonna work? When the checkrad is runned? Yeah, this means that checkrad (which pulls the Acct-Session-Id from radutmp)'s STOP packet will match both SQL and radutmp... -- Paul "TBBle" Hampson, on an alternate email client. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html