diff options
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-x | etc/rc.newwanip | 8 |
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) */ |