diff options
author | Ermal <eri@pfsense.org> | 2013-02-12 12:01:09 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-12 12:01:29 +0000 |
commit | 096f2962a95269a4ac69a38fd615d6e4da0256eb (patch) | |
tree | c2542532a609450f3f344e66bc1d0812f542f9a5 /etc | |
parent | 443c28221707827578d1df3f7b5fbace62513d7d (diff) | |
download | pfsense-096f2962a95269a4ac69a38fd615d6e4da0256eb.zip pfsense-096f2962a95269a4ac69a38fd615d6e4da0256eb.tar.gz |
Ticket #1629 Another round of fixes related to state clearing
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 5 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 12ef74f..15c9db3 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -145,6 +145,11 @@ function filter_delete_states_for_down_gateways() { $gwiface = get_real_interface($gateway['friendlyiface']); $cmd = "/sbin/pfctl -i {$gwiface} -Fs"; mwexec($cmd); + $gwip = $gateway['gateway']; + if (is_ipaddr($gwip)) { + $cmd = "/sbin/pfctl -i {$gwiface} -Fs -G {$gwip}"; + mwexec($cmd); + } } } } diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 6698ba5..55c8bbc 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1235,7 +1235,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 -i {$realif} -Fs"); + mwexec("/sbin/pfctl -i {$realif} -Fs; /sbin/pfctl -i {$realif} -Fs -G {$old_router}"); } /* remove interface up file if it exists */ |