mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Tune up a bit dhclient-script and call the kill state command only once its enough
This commit is contained in:
parent
eff8ea7dfa
commit
1befdbf866
@ -1240,7 +1240,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; /sbin/pfctl -i {$realif} -Fs -G {$old_router}");
|
||||
mwexec("/sbin/pfctl -i {$realif} -Fs -G {$old_router}");
|
||||
}
|
||||
|
||||
/* remove interface up file if it exists */
|
||||
|
||||
@ -77,7 +77,7 @@ delete_old_states() {
|
||||
if [ -z "${OLD_ROUTER}" ] && [ -f /tmp/${interface}_router ]; then
|
||||
OLD_ROUTER = `cat /tmp/${interface}_router`
|
||||
fi
|
||||
if [ -n $OLD_ROUTER ]; then
|
||||
if [ -n "${OLD_ROUTER}" ]; then
|
||||
$LOGGER "Comparing Routers: Old: ${OLD_ROUTER} New: ${new_routers}"
|
||||
if [ "${OLD_ROUTER}" != "${new_routers}" ]; then
|
||||
$LOGGER "Removing states through old gateway '${OLD_ROUTER}' (new gateway '${new_routers}')"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user