diff options
author | jim-p <jimp@pfsense.org> | 2012-09-27 00:43:57 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-09-27 00:43:57 -0400 |
commit | 96f7a687af3b826c4e23150291e5d0c8ea1073a1 (patch) | |
tree | ab0c5c91325071f15d80827cb4d5b60d2f12557d /etc | |
parent | d7402222e3be4794b15c7bad89797f7725590a9f (diff) | |
download | pfsense-96f7a687af3b826c4e23150291e5d0c8ea1073a1.zip pfsense-96f7a687af3b826c4e23150291e5d0c8ea1073a1.tar.gz |
Some more state killing refinements.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index ec6e9cf..3747805 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1153,6 +1153,12 @@ function interface_bring_down($interface = "wan", $destroy = false) { break; } + $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 -b 0.0.0.0/32 -b {$old_router}/32"); + } /* remove interface up file if it exists */ unlink_if_exists("{$g['tmp_path']}/{$realif}up"); |