diff options
-rw-r--r-- | src/conf.default/config.xml | 3 | ||||
-rw-r--r-- | src/etc/inc/filter.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 17 | ||||
-rwxr-xr-x | src/etc/rc.kill_states | 2 | ||||
-rw-r--r-- | src/usr/local/www/system_advanced_misc.php | 14 |
6 files changed, 25 insertions, 15 deletions
diff --git a/src/conf.default/config.xml b/src/conf.default/config.xml index 4e71a27..1af76bb 100644 --- a/src/conf.default/config.xml +++ b/src/conf.default/config.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <pfsense> - <version>13.8</version> + <version>13.9</version> <lastchange/> <system> <optimization>normal</optimization> @@ -49,7 +49,6 @@ <bogons> <interval>monthly</interval> </bogons> - <kill_states/> </system> <interfaces> <wan> diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 9eb7c88..ab314ee 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -212,7 +212,7 @@ function filter_configure() { function filter_delete_states_for_down_gateways() { global $config, $GatewaysList; - if (isset($config['system']['kill_states'])) { + if (!isset($config['system']['gw_down_kill_states'])) { return; } diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 2fde4b6..91fc0ee 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -99,7 +99,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "13.8", + "latest_config" => "13.9", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 8c2b837..5a5425d 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -3330,9 +3330,8 @@ function upgrade_096_to_097() { } function upgrade_097_to_098() { - global $config, $g; - /* Disable kill_states by default */ - $config['system']['kill_states'] = true; + // no longer used (used to set kill_states) + return; } function upgrade_098_to_099() { @@ -4326,4 +4325,16 @@ function upgrade_137_to_138() { } } +function upgrade_138_to_139() { + global $config; + + // clean up state killing on gateway failure. having kill_states set used to mean it was disabled + // now set gw_down_kill_states if enabled. + if (!isset($config['system']['kill_states'])) { + $config['system']['gw_down_kill_states'] = true; + } else { + unset($config['system']['kill_states']); + } +} + ?> diff --git a/src/etc/rc.kill_states b/src/etc/rc.kill_states index 571cc90..dcf8666 100755 --- a/src/etc/rc.kill_states +++ b/src/etc/rc.kill_states @@ -85,7 +85,7 @@ if (!empty($local_ip)) { } } -if (!isset($config['system']['kill_states'])) { +if (isset($config['system']['gw_down_kill_states'])) { if (!empty($local_ip)) { log_error("rc.kill_states: Removing states for IP {$local_ip}/{$subnet_bits}"); $nat_states = exec_command("/sbin/pfctl -i {$interface} -ss | " . diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php index 7d296b2..c3a321c 100644 --- a/src/usr/local/www/system_advanced_misc.php +++ b/src/usr/local/www/system_advanced_misc.php @@ -83,7 +83,7 @@ $pconfig['powerd_enable'] = isset($config['system']['powerd_enable']); $pconfig['crypto_hardware'] = $config['system']['crypto_hardware']; $pconfig['thermal_hardware'] = $config['system']['thermal_hardware']; $pconfig['schedule_states'] = isset($config['system']['schedule_states']); -$pconfig['kill_states'] = isset($config['system']['kill_states']); +$pconfig['gw_down_kill_states'] = isset($config['system']['gw_down_kill_states']); $pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']); $pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); $pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size']; @@ -251,10 +251,10 @@ if ($_POST) { unset($config['system']['schedule_states']); } - if ($_POST['kill_states'] == "yes") { - $config['system']['kill_states'] = true; + if ($_POST['gw_down_kill_states'] == "yes") { + $config['system']['gw_down_kill_states'] = true; } else { - unset($config['system']['kill_states']); + unset($config['system']['gw_down_kill_states']); } if ($_POST['skip_rules_gw_down'] == "yes") { @@ -491,12 +491,12 @@ $form->add($section); $section = new Form_Section('Gateway Monitoring'); $section->addInput(new Form_Checkbox( - 'kill_states', + 'gw_down_kill_states', 'State Killing on Gateway Failure', 'Flush all states when a gateway goes down', - $pconfig['kill_states'] + $pconfig['gw_down_kill_states'] ))->setHelp('The monitoring process will flush all states when a gateway goes down '. - 'if this box is not checked. Check this box to disable this behavior.'); + 'if this box is checked.'); $section->addInput(new Form_Checkbox( 'skip_rules_gw_down', |