Closed tarelda closed 1 year ago
Unfortunately this is how it's worked since we first implemented the checkrad function. It is very difficult to change this behavior now, as millions of sites depend on the existing behavior.
You can fix this by using a site-local policy. Something like this:
session {
sql_acct_old {
fail = 1
}
if (fail) {
update control {
Post-Auth-Type := Reject
}
}
and that should work.
Unfortunately this is how it's worked since we first implemented the checkrad function. It is very difficult to change this behavior now, as millions of sites depend on the existing behavior.
You can fix this by using a site-local policy. Something like this:
session { sql_acct_old { fail = 1 } if (fail) { update control { Post-Auth-Type := Reject } }
and that should work.
Sorry for the digging this up, but I have one follow up question regarding related behaviour. Can I ask Freeradius to restrict zapping to sessions that are on the same NAS? I mean request NAS has to be exact the same as NAS in accounting database?
@alandekok Also your snippet produced really bizzare result:
rlm_sql (sql_acct_old): Released connection (1)
(6) [sql_acct_old] = fail
(6) if (fail) {
(6) if (fail) -> TRUE
(6) if (fail) {
(6) update control {
(6) Post-Auth-Type := Reject
(6) } # update control = noop
(6) } # if (fail) = noop
(6) } # session = noop
(6) Using Post-Auth-Type Reject
(6) # Executing group from file /etc/freeradius/servers.d/default
(6) Post-Auth-Type REJECT {
(6) attr_filter.access_reject: EXPAND %{User-Name}
(6) attr_filter.access_reject: --> TEST
(6) attr_filter.access_reject: Matched entry DEFAULT at line 11
(6) [attr_filter.access_reject] = updated
(6) } # Post-Auth-Type REJECT = updated
(6) Sent Access-Accept Id 224 from 192.168.3.26:1812 to 192.168.3.88:55446 length 20
What type of defect/bug is this?
Unexpected behaviour (obvious or verified by project member)
How can the issue be reproduced?
I use customized rlm_sql configuration and I have modified checkrad (it is API compatibile) to my needs to facilitate stale session delete. Tested scenario is as follows:
I believe expected result is to issue Access-Reject and wait for another login attempt.
Log output from the FreeRADIUS daemon
Relevant log output from client utilities
No response
Backtrace from LLDB or GDB
No response