summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-08 19:46:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-08 19:46:34 +0000
commit7756e2b77f62b8f08d4b45838ad9346d5e0d1560 (patch)
tree7fafa32ec6808213b66d6fc1bf8f419d83e53504 /etc/inc/config.inc
parentd0a97914d527785d3653b4c972c59d85506aa3f7 (diff)
downloadpfsense-7756e2b77f62b8f08d4b45838ad9346d5e0d1560.zip
pfsense-7756e2b77f62b8f08d4b45838ad9346d5e0d1560.tar.gz
Upon updating from configuration version 1.6 -> 1.7, whipe the traffic shaper configuration to avoid loading the old non supported configuration.
Ticket #216 ok: billm
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 7d552dc..383a9d5 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -587,6 +587,19 @@ function convert_config() {
$config['version'] = "1.6";
}
+
+ /* Convert 1.6 -> 1.7 */
+ if ($config['version'] == "1.6") {
+ /* wipe previous shaper configuration */
+ unset($config['shaper']['queue']);
+ unset($config['shaper']['rule']);
+ unset($config['interfaces']['wan']['bandwidth']);
+ unset($config['interfaces']['wan']['bandwidthtype']);
+ unset($config['interfaces']['lan']['bandwidth']);
+ unset($config['interfaces']['lan']['bandwidthtype']);
+ $config['shaper']['enable'] = FALSE;
+ $config['version'] = "1.7";
+ }
if ($prev_version != $config['version'])
write_config("Upgraded config version level from {$prev_version} to {$config['version']}");
OpenPOWER on IntegriCloud