summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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