diff options
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 */ |