diff options
author | Ermal <eri@pfsense.org> | 2012-12-17 11:32:09 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-12-17 11:32:09 +0000 |
commit | 1272429c1b2b95a16be8af0469cac855cdbc1887 (patch) | |
tree | 25b6568f39578d64dca1ac44bb17fdc037f206ac /usr | |
parent | 30171d554c0433a52acb4a9f3bc96bf0b8cd01ed (diff) | |
download | pfsense-1272429c1b2b95a16be8af0469cac855cdbc1887.zip pfsense-1272429c1b2b95a16be8af0469cac855cdbc1887.tar.gz |
Handle even hostname through filterdns entries correctly now that only 3/4 table exists and they consider pipe argument. While here adapt addinga hostname without reloading CP
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_captiveportal_hostname.php | 12 | ||||
-rwxr-xr-x | usr/local/www/services_captiveportal_hostname_edit.php | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/services_captiveportal_hostname.php b/usr/local/www/services_captiveportal_hostname.php index e7e2cd1..b575b29 100755 --- a/usr/local/www/services_captiveportal_hostname.php +++ b/usr/local/www/services_captiveportal_hostname.php @@ -76,12 +76,12 @@ if ($_GET['act'] == "del" && !empty($cpzone)) { captiveportal_ipfw_set_context($zone); mwexec("/sbin/ipfw table 3 delete {$ip}"); mwexec("/sbin/ipfw table 4 delete {$ip}"); - mwexec("/sbin/ipfw table 5 delete {$ip}"); - mwexec("/sbin/ipfw table 6 delete {$ip}"); - mwexec("/sbin/ipfw table 7 delete {$ip}"); - mwexec("/sbin/ipfw table 8 delete {$ip}"); - mwexec("/sbin/ipfw table 9 delete {$ip}"); - mwexec("/sbin/ipfw table 10 delete {$ip}"); + $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $ip); + if (is_array($ipfw)) { + captiveportal_free_dn_ruleno($ipfw['dnpipe']); + pfSense_pipe_action("pipe delete {$ipfw['dnpipe']}"); + pfSense_pipe_action("pipe delete " . ($ipfw['dnpipe']+1)); + } } } diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php index a5c6a14..1d3fa50 100755 --- a/usr/local/www/services_captiveportal_hostname_edit.php +++ b/usr/local/www/services_captiveportal_hostname_edit.php @@ -138,8 +138,8 @@ if ($_POST) { write_config(); - if (isset($a_cp[$cpzone]['enable']) && is_module_loaded("ipfw.ko")) - captiveportal_init_rules(); + captiveportal_allowedip_configure_entry($ip, true); + captiveportal_allowedhostname_configure(); header("Location: services_captiveportal_hostname.php?zone={$cpzone}"); exit; |