summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-11-21 21:18:00 +0000
committerErmal <eri@pfsense.org>2013-11-21 21:18:00 +0000
commitbaec2b007fa963f9c047ef08b16abc92c571c407 (patch)
tree94d4ecc36df550dbcbade2518b33fc5211a3f3f8 /usr/local/www/services_captiveportal_mac_edit.php
parentfc5a4f3c22bc0cfc44a8d0e74a1a5fda12ba9f8b (diff)
downloadpfsense-baec2b007fa963f9c047ef08b16abc92c571c407.zip
pfsense-baec2b007fa963f9c047ef08b16abc92c571c407.tar.gz
Properly create zones for the CP with the new command arguments and properly invoke ipfw for applying rules and other configuration options.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac_edit.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php
index ef70c45..e03454d 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -54,6 +54,9 @@ require_once("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+global $cpzone;
+global $cpzoneid;
+
$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit MAC address rules"));
$shortcut_section = "captiveportal";
@@ -153,12 +156,14 @@ if ($_POST) {
write_config();
if (isset($config['captiveportal'][$cpzone]['enable'])) {
+ $cpzoneid = $config['captiveportal'][$cpzone]['zoneid'];
$rules = captiveportal_passthrumac_delete_entry($oldmac);
$rules .= captiveportal_passthrumac_configure_entry($mac);
$uniqid = uniqid("{$cpzone}_macedit");
file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules);
- mwexec("/sbin/ipfw -x {$cpzone} -q {$g['tmp_path']}/{$uniqid}_tmp");
+ mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp");
@unlink("{$g['tmp_path']}/{$uniqid}_tmp");
+ unset($cpzoneid);
}
header("Location: services_captiveportal_mac.php?zone={$cpzone}");
OpenPOWER on IntegriCloud