summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_hostname_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-02-02 16:20:42 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-02-02 16:20:42 -0500
commitb44f72d1b120b2f23d3f01a60df1d95f6346da74 (patch)
tree232984693d98c7e72cebf057c9c77f463bbb213c /usr/local/www/services_captiveportal_hostname_edit.php
parent5289dc575b0ed5a8d3c1ca556442cf57525d3fb5 (diff)
downloadpfsense-b44f72d1b120b2f23d3f01a60df1d95f6346da74.zip
pfsense-b44f72d1b120b2f23d3f01a60df1d95f6346da74.tar.gz
Reinit rules after edit
Diffstat (limited to 'usr/local/www/services_captiveportal_hostname_edit.php')
-rwxr-xr-xusr/local/www/services_captiveportal_hostname_edit.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php
index b6e580a..c5ed985 100755
--- a/usr/local/www/services_captiveportal_hostname_edit.php
+++ b/usr/local/www/services_captiveportal_hostname_edit.php
@@ -133,19 +133,8 @@ if ($_POST) {
write_config();
- if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko")) {
- $rules = "";
- $hostname = gethostbyname($oldip);
- if($hostname)
- for ($i = 3; $i < 10; $i++)
- $rules .= "table {$i} delete {$hostname}\n";
- $hostname = gethostbyname($ip);
- if(is_ipaddr($hostname))
- $rules .= captiveportal_allowedip_configure_entry($hostname);
- file_put_contents("{$g['tmp_path']}/allowedhostname_tmp{$id}", $rules);
- mwexec("/sbin/ipfw -q {$g['tmp_path']}/allowedhostname_tmp{$id}");
- @unlink("{$g['tmp_path']}/allowedhostname_tmp{$id}");
- }
+ if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko"))
+ captiveportal_init_rules(true);
header("Location: services_captiveportal_hostname.php");
exit;
OpenPOWER on IntegriCloud