Bug #3447
closedpfSense 2.1 Captive Portal RADIUS Accouting records not sent to RADIUS Server
100%
Description
Code in /etc/inc/cativeportal.inc is referring to the wrong columns in the array returned by captiveportal_read_db().
For example in captiveportal_disconnect_client() column 10 is being used to find the RADIUS server to use but its actually in column 9.
Changing the column reference to 9 causes the correct data to be sent to RADIUS in the event of a DISCONNECT.
Updated by Chris Buechler over 10 years ago
- Assignee set to Ermal Luçi
- Target version set to 2.1.1
Updated by Richard Gate over 10 years ago
Changing to code in captiveportal_disconnect_client() to use column 9 was a bit of a fluke as that column just happened to be null.
Looking at the code in captiveportal_opendb() which contains the CREATE for the table, there is no information on the RADIUS server to use.
So I don't know what's going on in captiveportal_disconnect_client() and other places in /etc/inc/cativeportal.inc to locate the correct RADIUS server.
Updated by Ermal Luçi over 10 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 74a40221d6ad7611bc6182aa506c5d6f5cee8edf.
Updated by Ermal Luçi over 10 years ago
Applied in changeset 2b76f145e40e47d06c7441ae8a419aeae9cc811b.
Updated by Richard Gate over 10 years ago
Hi, tested this on a new 2.1 install. There is a small error in construction of the query used to update the database that gives rise to the error "logportalauth94921: Trying to modify DB returned error: no such column: first" written to the "Portal Auth" log. The last field in the query is not quoted.
INSERT INTO captiveportal (allow_time, pipeno, ip, mac, username, sessionid, bpassword, session_timeout, idle_timeout, session_terminate_time, interim_interval, radiusctx) VALUES (1395148545, 2022, '192.168.191.9', 'xx:xx:xx:xx:xx:xx', 'xxxxxxxxx', 'xxxxxxxx', 'xxxxxxxx', 18000, 3600, NULL, 16688685, first)
Updated by Richard Gate over 10 years ago
Looks like its at line 1922 in /etc/inc/captiveportal.inc
Updated by Renato Botelho over 10 years ago
It was already fixed, are you using the latest 2.1.1 snapshots to test?
Updated by Richard Gate over 10 years ago
I'm using 2.1 with the patch for Bug #3447 applied. The patch itself has the error in it;
$insertquery .= "{$session_timeout}, {$idle_timeout}, {$session_terminate_time}, {$interim_interval}, {$radiusctx})";
should be;
$insertquery .= "{$session_timeout}, {$idle_timeout}, {$session_terminate_time}, {$interim_interval}, '{$radiusctx}')";
Updated by Renato Botelho over 10 years ago
It was already fixed as you can see on 846bedf994079102c29cd140b41b2d1deb466a13 It's better if you gitsync or use one of the new 2.1.1 snapshots
Updated by Richard Gate over 10 years ago
Sorry I misunderstood when you said "it was already fixed". I thought you meant before 3447, not its been fixed since 3447 BUT before NOW :-)
Updated by Renato Botelho over 10 years ago
Richard Gate wrote:
Sorry I misunderstood when you said "it was already fixed". I thought you meant before 3447, not its been fixed since 3447 BUT before NOW :-)
Yeah, just let us know the results of your tests when you are done please.
Updated by Chris Buechler over 10 years ago
should be fixed in 2.1.1 but will leave for feedback for now.
Updated by Chris Buechler over 9 years ago
- Status changed from Feedback to Resolved
was fixed a while back