summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.newwanip8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index ce10394..b903210 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -186,9 +186,11 @@ if(is_array($config['gifs']['gif'])){
*/
if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interfaces'][$interface]['ipaddr'])) {
/* option to flush state table on IP change */
- if (isset($config['system']['ip_change_kill_states'])) {
- log_error("Killing all states post-IP change.");
- filter_flush_state_table();
+ if ($curwanip != $oldip) {
+ if (isset($config['system']['ip_change_kill_states'])) {
+ log_error("Killing all states post-IP change.");
+ filter_flush_state_table();
+ }
}
/* reconfigure static routes (kernel may have deleted them) */
OpenPOWER on IntegriCloud