From 9eb49a5152a8f3affbf85eaf1923e60eef3b1375 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 30 Jan 2013 10:22:02 +0000 Subject: pfctl -b is gone just use std tools of pfctl --- etc/inc/filter.inc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'etc/inc/filter.inc') diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index cf6fbc9..883b737 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -139,17 +139,12 @@ function filter_delete_states_for_down_gateways() { continue; $gwstatus =& $a_gateways[$gateway['monitor']]; if (strstr($gwstatus['status'], "down")) { - $gwip = $gateway['gateway']; - if (!is_ipaddr($gwip)) - $gwip = get_interface_gateway($gateway['friendlyiface']); - if (is_ipaddr($gwstatus['srcip'])) { - $cmd = "/sbin/pfctl -b {$gwstatus['srcip']}/32 "; - if (is_ipaddr($gwip)) - $cmd .= "-b {$gwip}/32"; - else - $cmd .= "-b 0.0.0.0/32"; - mwexec($cmd); - } + if (!empty($gateway['interface'])) + $gwiface = $gateway['interface']; + else + $gwiface = get_real_interface($gateway['friendlyiface']); + $cmd = "/sbin/pfctl -i {$gwiface} -k 0.0.0.0/0"; + mwexec($cmd); } } } -- cgit v1.1