mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 11:26:13 +00:00
cleanup ipfw leftovers which used the php-pfSense module (unused)
This commit is contained in:
parent
159b57db83
commit
78e41a00cb
@ -53,23 +53,6 @@ if ($_GET['act'] == "del" && !empty($cpzone)) {
|
||||
$a_allowedhostnames =& $a_cp[$cpzone]['allowedhostname'];
|
||||
if ($a_allowedhostnames[$_GET['id']]) {
|
||||
$ipent = $a_allowedhostnames[$_GET['id']];
|
||||
|
||||
if (isset($a_cp[$cpzone]['enable'])) {
|
||||
if (!empty($ipent['sn']))
|
||||
$ipent['ip'] .= "/{$ipent['sn']}";
|
||||
$ip = gethostbyname($ipent['ip']);
|
||||
if(is_ipaddr($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));
|
||||
}
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 3, $ip);
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 4, $ip);
|
||||
}
|
||||
}
|
||||
|
||||
unset($a_allowedhostnames[$_GET['id']]);
|
||||
write_config();
|
||||
captiveportal_allowedhostname_configure();
|
||||
|
||||
@ -52,21 +52,6 @@ if ($_GET['act'] == "del") {
|
||||
$a_allowedips =& $config['captiveportal'][$cpzone]['allowedip'];
|
||||
if ($a_allowedips[$_GET['id']]) {
|
||||
$ipent = $a_allowedips[$_GET['id']];
|
||||
|
||||
if (isset($config['captiveportal'][$cpzone]['enable'])) {
|
||||
$mask = (!empty($ipent['sn'])) ? $ipent['sn'] : 32;
|
||||
|
||||
$ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $ipent['ip'], $mask);
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 3, $ipent['ip'], $mask);
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 4, $ipent['ip'], $mask);
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
unset($a_allowedips[$_GET['id']]);
|
||||
write_config();
|
||||
header("Location: services_captiveportal_ip.php?zone={$cpzone}");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user