summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMichael Newton <miken32@gmail.com>2013-02-14 22:06:06 -0800
committerMichael Newton <miken32@gmail.com>2013-02-14 22:06:06 -0800
commitf1ab195e81bb71c987a5b9d0f095ac14aef82e4d (patch)
treee26fbcf054a69b0ca4f76976482b4cffc566d692 /etc
parent00109fef227cd83f9e440b663f110f93ffdd1d6e (diff)
downloadpfsense-f1ab195e81bb71c987a5b9d0f095ac14aef82e4d.zip
pfsense-f1ab195e81bb71c987a5b9d0f095ac14aef82e4d.tar.gz
self-explanatory now, no comments needed
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc82
1 files changed, 41 insertions, 41 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 120dcad..8888a17 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -630,7 +630,7 @@ function captiveportal_prune_old() {
if ($timeout) {
if (($pruning_time - $cpentry['allow_time']) >= $timeout) {
$timedout = true;
- $term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
+ $term_cause = RADIUS_TERM_SESSION_TIMEOUT;
}
}
@@ -638,7 +638,7 @@ function captiveportal_prune_old() {
if (!$timedout && !empty($cpentry['session_terminate_time'])) {
if ($pruning_time >= $cpentry['session_terminate_time']) {
$timedout = true;
- $term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
+ $term_cause = RADIUS_TERM_SESSION_TIMEOUT;
}
}
@@ -653,7 +653,7 @@ function captiveportal_prune_old() {
$lastact = $lastact ? $lastact : $cpentry['allow_time'];
if ($lastact && (($pruning_time - $lastact) >= $uidletimeout)) {
$timedout = true;
- $term_cause = RADIUS_TERM_IDLE_TIMEOUT; // Idle-Timeout
+ $term_cause = RADIUS_TERM_IDLE_TIMEOUT;
$stop_time = $lastact; // Entry added to comply with WISPr
}
}
@@ -662,7 +662,7 @@ function captiveportal_prune_old() {
if (!$timedout && isset($vcpcfg['enable']) && !empty($cpentry['session_timeout'])) {
if ($pruning_time >= ($cpentry['allow_time'] + $cpentry['session_timeout'])) {
$timedout = true;
- $term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
+ $term_cause = RADIUS_TERM_SESSION_TIMEOUT;
$voucher_needs_sync = true;
}
}
@@ -671,7 +671,7 @@ function captiveportal_prune_old() {
if (!$timedout && isset($cpcfg['radiussession_timeout']) && !empty($cpentry['session_timeout'])) {
if ($pruning_time >= ($cpentry['allow_time'] + $cpentry['session_timeout'])) {
$timedout = true;
- $term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
+ $term_cause = RADIUS_TERM_SESSION_TIMEOUT;
}
}
@@ -686,22 +686,22 @@ function captiveportal_prune_old() {
if (isset($cpcfg['radacct_enable'])) {
if ($cpcfg['reauthenticateacct'] == "stopstart") {
/* stop and restart accounting */
- RADIUS_ACCOUNTING_STOP($cpentry['pipeno'], // ruleno
- $cpentry['username'], // username
- $cpentry['sessionid'], // sessionid
- $cpentry['allow_time'], // start time
+ RADIUS_ACCOUNTING_STOP($cpentry['pipeno'],
+ $cpentry['username'],
+ $cpentry['sessionid'],
+ $cpentry['allow_time'],
$radiusservers,
- $cpentry['ip'], // clientip
- $cpentry['mac'], // clientmac
- RADIUS_TERM_NAS_REQUEST); // NAS Request
+ $cpentry['ip'],
+ $cpentry['mac'],
+ RADIUS_TERM_NAS_REQUEST);
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 1, $cpentry[2]);
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 2, $cpentry[2]);
- RADIUS_ACCOUNTING_START($cpentry['pipeno'], // ruleno
- $cpentry['username'], // username
- $cpentry['sessionid'], // sessionid
+ RADIUS_ACCOUNTING_START($cpentry['pipeno'],
+ $cpentry['username'],
+ $cpentry['sessionid'],
$radiusservers,
- $cpentry['ip'], // clientip
- $cpentry['mac']); // clientmac
+ $cpentry['ip'],
+ $cpentry['mac']);
} else if ($cpcfg['reauthenticateacct'] == "interimupdate") {
$session_time = $pruning_time - $cpentry['allow_time'];
if (!empty($cpentry['interim_interval']) && $cpentry['interim_interval'] > 60)
@@ -711,27 +711,27 @@ function captiveportal_prune_old() {
$past_interval_min = ($session_time > $interval);
$within_interval = ($session_time % $interval >= 0 && $session_time % $interval <= 59);
if (($interval > 0 && $past_interval_min && $within_interval) || $interval === 0) {
- RADIUS_ACCOUNTING_STOP($cpentry['pipeno'], // ruleno
- $cpentry['username'], // username
- $cpentry['sessionid'], // sessionid
- $cpentry['allow_time'], // start time
+ RADIUS_ACCOUNTING_STOP($cpentry['pipeno'],
+ $cpentry['username'],
+ $cpentry['sessionid'],
+ $cpentry['allow_time'],
$radiusservers,
- $cpentry['ip'], // clientip
- $cpentry['mac'], // clientmac
+ $cpentry['ip'],
+ $cpentry['mac'],
0,
- true); // Interim Updates
+ true); // Interim Update
}
}
}
/* check this user against RADIUS again */
if (isset($cpcfg['reauthenticate'])) {
- $auth_list = RADIUS_AUTHENTICATION($cpentry['username'], // username
- base64_decode($cpentry['bpassword']), // password
+ $auth_list = RADIUS_AUTHENTICATION($cpentry['username'],
+ base64_decode($cpentry['bpassword']),
$radiusservers,
- $cpentry['ip'], // clientip
- $cpentry['mac'], // clientmac
- $cpentry['pipeno']); // ruleno
+ $cpentry['ip'],
+ $cpentry['mac'],
+ $cpentry['pipeno']);
if ($auth_list['auth_val'] == 3) {
captiveportal_disconnect($cpentry, $radiusservers, RADIUS_TERM_NAS_REQUEST);
captiveportal_logportalauth($cpentry['username'], $cpentry['mac'], $cpentry['ip'], "RADIUS_DISCONNECT", $auth_list['reply_message']);
@@ -824,12 +824,12 @@ function captiveportal_disconnect($dbent, $radiusservers,$term_cause = 1,$stop_t
/* this client needs to be deleted - remove ipfw rules */
if (isset($config['captiveportal'][$cpzone]['radacct_enable']) && !empty($radiusservers)) {
RADIUS_ACCOUNTING_STOP($dbent['pipeno'], // ruleno
- $dbent['username'], // username
- $dbent['sessionid'], // sessionid
- $dbent['allow_time'], // start time
+ $dbent['username'],
+ $dbent['sessionid'],
+ $dbent['allow_time'],
$radiusservers,
- $dbent['ip'], // clientip
- $dbent['mac'], // clientmac
+ $dbent['ip'],
+ $dbent['mac'],
$term_cause, // Acct-Terminate-Cause
false,
$stop_time);
@@ -904,14 +904,14 @@ function captiveportal_radius_stop_all() {
if (empty($cpentry['context']))
$cpentry['context'] = 'first';
if (!empty($radiusservers[$cpentry['context']])) {
- RADIUS_ACCOUNTING_STOP($cpentry['pipeno'], // ruleno
- $cpentry['username'], // username
- $cpentry['sessionid'], // sessionid
- $cpentry['allow_time'], // start time
+ RADIUS_ACCOUNTING_STOP($cpentry['pipeno'],
+ $cpentry['username'],
+ $cpentry['sessionid'],
+ $cpentry['allow_time'],
$radiusservers[$cpentry['context']],
- $cpentry['ip'], // clientip
- $cpentry['mac'], // clientmac
- RADIUS_TERM_NAS_REBOOT); // Admin Reboot
+ $cpentry['ip'],
+ $cpentry['mac'],
+ RADIUS_TERM_NAS_REBOOT);
}
}
}
OpenPOWER on IntegriCloud