summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorRalph Haussmann <ralph@scanmyfood.de>2017-02-12 11:12:05 +0100
committerRalph Haussmann <ralph@scanmyfood.de>2017-02-12 11:18:46 +0100
commita84da2286cc5353b5ce7161aa3d59ccd43ae3868 (patch)
tree87bb412a92036dfaafc7041bd3eedac99ea6a83f /src/etc
parentea9d2cd377f22a90795e6874c4d033d0ae98eca6 (diff)
downloadpfsense-a84da2286cc5353b5ce7161aa3d59ccd43ae3868.zip
pfsense-a84da2286cc5353b5ce7161aa3d59ccd43ae3868.tar.gz
Improve log output when ip_change_kill_states is set.
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/rc.newwanip9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip
index 920c1e5..e59e607 100755
--- a/src/etc/rc.newwanip
+++ b/src/etc/rc.newwanip
@@ -200,12 +200,13 @@ if (platform_booting()) {
if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interfaces'][$interface]['ipaddr'])) {
/* IP changed, kill states accordingly */
if ($curwanip != $oldip) {
- log_error("IP has changed, killing states on former IP $oldip.");
- pfSense_kill_states($oldip);
if (isset($config['system']['ip_change_kill_states'])) {
- /* hidden config option to wipe all states if needed */
- log_error("Killing all states post-IP change.");
+ log_error("IP has changed, killing all states (ip_change_kill_states is set).");
+ pfSense_kill_states($oldip);
filter_flush_state_table();
+ } else {
+ log_error("IP has changed, killing states on former IP $oldip.");
+ pfSense_kill_states($oldip);
}
}
OpenPOWER on IntegriCloud