diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-06-10 10:40:33 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-06-10 10:40:33 -0300 |
commit | e912bfae186b6b657daf52607f9d027f46be0478 (patch) | |
tree | 5c39d837612a5895b7ce82ddf8a98b98cec62981 /etc/inc | |
parent | 6da518fceed180617f6dc2dfbc2daa6d3b1f2cbb (diff) | |
download | pfsense-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/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 3 |
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 */ |