summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-10 10:40:33 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-10 10:40:33 -0300
commite912bfae186b6b657daf52607f9d027f46be0478 (patch)
tree5c39d837612a5895b7ce82ddf8a98b98cec62981 /etc
parent6da518fceed180617f6dc2dfbc2daa6d3b1f2cbb (diff)
downloadpfsense-e912bfae186b6b657daf52607f9d027f46be0478.zip
pfsense-e912bfae186b6b657daf52607f9d027f46be0478.tar.gz
Fix #3700 and other syntax issues:
- Remove -G parameter from pfctl since it doesn't exist anymore - Initialize $old_router - Fix sh syntax on variable assign, it couldn't have space before = - Simplify logic - Avoid flush states twice, if it was done on IP change, don't do it again if router also has changed
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index f5aee01..6be3e27 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1314,12 +1314,13 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg =
services_dhcpd_configure('inet6', $track6);
}
+ $old_router = '';
if (file_exists("{$g['tmp_path']}/{$realif}_router"))
$old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"));
// 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 -i " . escapeshellarg($realif) . " -Fs -G {$old_router}");
+ mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs");
}
/* remove interface up file if it exists */
OpenPOWER on IntegriCloud