diff options
author | plumbeo <plumbeo@users.noreply.github.com> | 2016-12-03 18:03:33 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-12-06 17:48:36 -0200 |
commit | cc99b29886559b85c0e01c8ee1ab0ac5455fef0e (patch) | |
tree | 69a930d9910562dddf10547e60ea3add8667ba71 /src/usr/local/www | |
parent | 36868398143f7595ed2e613128fbfdbfb2987531 (diff) | |
download | pfsense-cc99b29886559b85c0e01c8ee1ab0ac5455fef0e.zip pfsense-cc99b29886559b85c0e01c8ee1ab0ac5455fef0e.tar.gz |
Captive portal: add option to include idle time in total session time
Add an option to choose whether the time spent idle by a user disconnected for exceeding the idle timeout must be included in the total session time sent to the RADIUS server or not.
(cherry picked from commit 1878e1c932fa467956ef44d4bd39adb7d4d21243)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/services_captiveportal.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php index 52edb39..8c5fd1c 100644 --- a/src/usr/local/www/services_captiveportal.php +++ b/src/usr/local/www/services_captiveportal.php @@ -222,6 +222,7 @@ if ($a_cp[$cpzone]) { $pconfig['passthrumacaddusername'] = isset($a_cp[$cpzone]['passthrumacaddusername']); $pconfig['radmac_format'] = $a_cp[$cpzone]['radmac_format']; $pconfig['reverseacct'] = isset($a_cp[$cpzone]['reverseacct']); + $pconfig['includeidletime'] = isset($a_cp[$cpzone]['includeidletime']); $pconfig['radiusnasid'] = $a_cp[$cpzone]['radiusnasid']; $pconfig['page'] = array(); if ($a_cp[$cpzone]['page']['htmltext']) { @@ -462,6 +463,7 @@ if ($_POST) { $newcp['passthrumacaddusername'] = $_POST['passthrumacaddusername'] ? true : false; $newcp['radmac_format'] = $_POST['radmac_format'] ? $_POST['radmac_format'] : false; $newcp['reverseacct'] = $_POST['reverseacct'] ? true : false; + $newcp['includeidletime'] = $_POST['includeidletime'] ? true : false; $newcp['radiusnasid'] = trim($_POST['radiusnasid']); if (!is_array($newcp['page'])) { @@ -1018,6 +1020,15 @@ $section->addInput(new Form_Checkbox( ))->setHelp('When enabled, data counts for RADIUS accounting packets will be taken from the client perspective, not the NAS. ' . 'Acct-Input-Octets will represent download, and Acct-Output-Octets will represent upload.'); +$section->addInput(new Form_Checkbox( + 'includeidletime', + 'Idle time accounting', + 'Include idle time in session time', + $pconfig['includeidletime'] +))->setHelp('When enabled, if a client is disconnected for exceeding the idle timeout the time spent idle is included in the total session time. ' . + 'Otherwise the session time reported to the RADIUS server is the time between when the session started and when the last ' . + 'activity was recorded.'); + $section->addInput(new Form_Input( 'radiusnasid', 'NAS Identifier', |