summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-30 10:22:02 +0000
committerErmal <eri@pfsense.org>2013-01-30 10:26:14 +0000
commit9eb49a5152a8f3affbf85eaf1923e60eef3b1375 (patch)
treefaa432c58d691cd7a82f606fd6f8f6a0d86549a1 /etc/inc
parent31b958d5b065a25d9b842d31d793000c93658e15 (diff)
downloadpfsense-9eb49a5152a8f3affbf85eaf1923e60eef3b1375.zip
pfsense-9eb49a5152a8f3affbf85eaf1923e60eef3b1375.tar.gz
pfctl -b is gone just use std tools of pfctl
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc17
-rw-r--r--etc/inc/interfaces.inc2
2 files changed, 7 insertions, 12 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);
}
}
}
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 890710e..f6a3122 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1188,7 +1188,7 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg =
// log_error("Checking for old router states: {$g['tmp_path']}/{$realif}_router = {$old_router}");
if (!empty($old_router)) {
log_error("Clearing states to old gateway {$old_router}.");
- mwexec("/sbin/pfctl -b 0.0.0.0/32 -b {$old_router}/32");
+ mwexec("/sbin/pfctl -i {$realif} -k 0.0.0.0/0");
}
/* remove interface up file if it exists */
OpenPOWER on IntegriCloud