diff options
author | Ermal <eri@pfsense.org> | 2013-01-30 10:22:02 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-30 10:26:14 +0000 |
commit | 9eb49a5152a8f3affbf85eaf1923e60eef3b1375 (patch) | |
tree | faa432c58d691cd7a82f606fd6f8f6a0d86549a1 /etc/inc/filter.inc | |
parent | 31b958d5b065a25d9b842d31d793000c93658e15 (diff) | |
download | pfsense-9eb49a5152a8f3affbf85eaf1923e60eef3b1375.zip pfsense-9eb49a5152a8f3affbf85eaf1923e60eef3b1375.tar.gz |
pfctl -b is gone just use std tools of pfctl
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r-- | etc/inc/filter.inc | 17 |
1 files changed, 6 insertions, 11 deletions
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); } } } |