From 461eac099b80692b1feb4002357da6a61f4a3aff Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 30 Oct 2014 13:15:41 -0500 Subject: only kill all states if the IP changed. ticket #1629 --- etc/rc.newwanip | 8 +++++--- 1 file 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) */ -- cgit v1.1