summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-13 14:47:19 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-13 14:50:22 -0200
commit0cd7c91a29a88c3ac859be9ee9563e1737924128 (patch)
treea66b562cfd87434bf838cc62ee0e54c12a2fd325
parentefca0d9ef9f001613a4d885ad5f4c589354f5334 (diff)
downloadpfsense-0cd7c91a29a88c3ac859be9ee9563e1737924128.zip
pfsense-0cd7c91a29a88c3ac859be9ee9563e1737924128.tar.gz
Subnet parameter is mandatory for pfSense_ipfw_Tableaction(), add where it's missing
-rw-r--r--etc/inc/captiveportal.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 25990c3..1b99e19 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -710,8 +710,9 @@ function captiveportal_prune_old() {
$cpentry[2], // clientip
$cpentry[3], // clientmac
10); // NAS Request
- $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 1, $cpentry[2], $cpentry[3]);
- $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 2, $cpentry[2], $cpentry[3]);
+ $clientsn = (is_ipaddrv6($cpentry[2])) ? 128 : 32;
+ $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 1, $cpentry[2], $clientsn, $cpentry[3]);
+ $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 2, $cpentry[2], $clientsn, $cpentry[3]);
RADIUS_ACCOUNTING_START($cpentry[1], // ruleno
$cpentry[4], // username
$cpentry[5], // sessionid
@@ -857,8 +858,9 @@ function captiveportal_disconnect($dbent, $radiusservers,$term_cause = 1,$stop_t
if (is_ipaddr($dbent[2])) {
/* Delete client's ip entry from tables 1 and 2. */
- $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 1, $dbent[2], $dbent[3]);
- $_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 2, $dbent[2], $dbent[3]);
+ $clientsn = (is_ipaddrv6($dbent[2])) ? 128 : 32;
+ pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 1, $dbent[2], $clientsn, $dbent[3]);
+ pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 2, $dbent[2], $clientsn, $dbent[3]);
/* XXX: Redundant?! Ensure all pf(4) states are killed. */
$_gb = @pfSense_kill_states($dbent[2]);
$_gb = @pfSense_kill_srcstates($dbent[2]);
OpenPOWER on IntegriCloud