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/local/www/services_captiveportal_hostname.php | |
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/local/www/services_captiveportal_hostname.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_hostname.php | 12 |
1 files changed, 6 insertions, 6 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)); + } } } |