diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-08 19:46:34 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-08 19:46:34 +0000 |
commit | 7756e2b77f62b8f08d4b45838ad9346d5e0d1560 (patch) | |
tree | 7fafa32ec6808213b66d6fc1bf8f419d83e53504 | |
parent | d0a97914d527785d3653b4c972c59d85506aa3f7 (diff) | |
download | pfsense-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
-rw-r--r-- | etc/inc/config.inc | 13 | ||||
-rw-r--r-- | etc/inc/globals.inc | 2 |
2 files changed, 14 insertions, 1 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']}"); diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 544b690..0f4fff1 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -50,7 +50,7 @@ $g = array( "n_pptp_units" => 16, /* this value can be overriden in pptp->n_pptp_units */ "pptp_subnet" => 28, /* this value can be overriden in pptp->pptp_subnet */ "debug" => false, - "latest_config" => "1.6", + "latest_config" => "1.7", "nopkg_platforms" => array("cdrom"), "nopccard_platforms" => array("wrap", "net48xx"), "xmlrpcbaseurl" => "www.pfsense.com", |