summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/filter.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 513cb79..dc0728f 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -144,13 +144,10 @@ function filter_delete_states_for_down_gateways() {
global $config;
$a_gateways = return_gateways_status();
- foreach ($a_gateways as $gateway) {
+ foreach ($a_gateways as $gwip => $gateway) {
if (stristr($status['status'], "down")) {
- if (is_ipaddr($gateway['srcip'])) {
- mwexec("/sbin/pfctl -b {$gateway['srcip']}");
- mwexec("/sbin/pfctl -K {$gateway['srcip']}");
- mwexec("/sbin/pfctl -k {$gateway['srcip']}");
- mwexec("/sbin/pfctl -k 0.0.0.0/0 -k {$gateway['srcip']}");
+ if (is_ipaddr($gateway['srcip']) && is_ipaddr($gwip)) {
+ mwexec("/sbin/pfctl -b {$gateway['srcip']} -b {$gwip}");
}
}
}
OpenPOWER on IntegriCloud