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:42:52 -0300 |
commit | ff3da5dba67c64514808e86165e92362f3ff8b33 (patch) | |
tree | 04524b8d66e9c4f7101ddae613d051b7ba64db6a /etc/inc | |
parent | 6a0f34b86bc74c48d4a77f0d21c5ca44339d1353 (diff) | |
download | pfsense-ff3da5dba67c64514808e86165e92362f3ff8b33.zip pfsense-ff3da5dba67c64514808e86165e92362f3ff8b33.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 76c7418..d234982 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1322,12 +1322,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 */ |