Project

General

Profile

Actions

Bug #3447

closed

pfSense 2.1 Captive Portal RADIUS Accouting records not sent to RADIUS Server

Added by Richard Gate almost 11 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ermal Luçi
Category:
Captive Portal
Target version:
-
Start date:
02/13/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:
All

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.

Actions #1

Updated by Chris Buechler almost 11 years ago

  • Assignee set to Ermal Luçi
  • Target version set to 2.1.1
Actions #2

Updated by Richard Gate almost 11 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.

Actions #3

Updated by Ermal Luçi almost 11 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Ermal Luçi almost 11 years ago

Actions #5

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)

Actions #6

Updated by Richard Gate over 10 years ago

Looks like its at line 1922 in /etc/inc/captiveportal.inc

Actions #7

Updated by Renato Botelho over 10 years ago

It was already fixed, are you using the latest 2.1.1 snapshots to test?

Actions #8

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}')";

Actions #9

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

Actions #10

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 :-)

Actions #11

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.

Actions #12

Updated by Chris Buechler over 10 years ago

  • Target version deleted (2.1.1)
Actions #13

Updated by Chris Buechler over 10 years ago

should be fixed in 2.1.1 but will leave for feedback for now.

Actions #14

Updated by Chris Buechler almost 10 years ago

  • Status changed from Feedback to Resolved

was fixed a while back

Actions

Also available in: Atom PDF