summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/config.inc25
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/interfaces.inc2
-rwxr-xr-xusr/local/www/interfaces.php6
-rwxr-xr-xusr/local/www/interfaces_wan.php6
5 files changed, 32 insertions, 9 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index b8e83fd..6dbbd78 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -424,6 +424,29 @@ function convert_config() {
$config['version'] = "1.4";
}
+ /* Convert 1.4 -> 1.5 */
+ if ($config['version'] == "1.4") {
+
+ /* Default route moved */
+ if (isset($config['interfaces']['wan']['gateway']))
+ if ($config['interfaces']['wan']['gateway'] <> "")
+ $config['system']['gateway'] = $config['interfaces']['wan']['gateway'];
+ unset($config['interfaces']['wan']['gateway']);
+
+ /* Queues are no longer interface specific */
+ if (isset($config['interfaces']['lan']['schedulertype']))
+ unset($config['interfaces']['lan']['schedulertype']);
+ if (isset($config['interfaces']['wan']['schedulertype']))
+ unset($config['interfaces']['wan']['schedulertype']);
+
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
+ if(isset($config['interfaces']['opt' . $i]['schedulertype']))
+ unset($config['interfaces']['opt' . $i]['schedulertype']);
+ }
+
+ $config['version'] = "1.5";
+ }
+
write_config();
if ($g['booting'])
@@ -845,4 +868,4 @@ function system_start_ftp_helpers() {
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 904194e..42a03d9 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -50,7 +50,7 @@ $g = array(
"n_pptp_units" => 16,
"pptp_subnet" => 28,
"debug" => false,
- "latest_config" => "1.4",
+ "latest_config" => "1.5",
"nopccard_platforms" => array("wrap", "net48xx"),
"pkg_config_location" => "http://www.pfsense.com/packages/pkg_config.xml"
);
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 313c967..96d4a87 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -391,7 +391,7 @@ function interfaces_wan_configure() {
}
/* install default route */
mwexec("/sbin/route delete default");
- mwexec("/sbin/route add default " . escapeshellarg($wancfg['gateway']));
+ mwexec("/sbin/route add default " . escapeshellarg($config['system']['gateway']));
/* resync ipfilter (done automatically for DHCP/PPPoE/PPTP) */
filter_resync();
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index a4fa794..7d93de9 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -68,7 +68,7 @@ if ($wancfg['ipaddr'] == "dhcp") {
$pconfig['type'] = "Static";
$pconfig['ipaddr'] = $wancfg['ipaddr'];
$pconfig['subnet'] = $wancfg['subnet'];
- $pconfig['gateway'] = $wancfg['gateway'];
+ $pconfig['gateway'] = $config['system']['gateway'];
$pconfig['pointtopoint'] = $wancfg['pointtopoint'];
}
@@ -175,7 +175,7 @@ if ($_POST) {
unset($wancfg['ipaddr']);
unset($wancfg['subnet']);
- unset($wancfg['gateway']);
+ unset($config['system']['gateway']);
unset($wancfg['pointtopoint']);
unset($wancfg['dhcphostname']);
unset($config['pppoe']['username']);
@@ -199,7 +199,7 @@ if ($_POST) {
if ($_POST['type'] == "Static") {
$wancfg['ipaddr'] = $_POST['ipaddr'];
$wancfg['subnet'] = $_POST['subnet'];
- $wancfg['gateway'] = $_POST['gateway'];
+ $config['system']['gateway'] = $_POST['gateway'];
if (isset($wancfg['ispointtopoint']))
$wancfg['pointtopoint'] = $_POST['pointtopoint'];
} else if ($_POST['type'] == "DHCP") {
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index a4fa794..7d93de9 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -68,7 +68,7 @@ if ($wancfg['ipaddr'] == "dhcp") {
$pconfig['type'] = "Static";
$pconfig['ipaddr'] = $wancfg['ipaddr'];
$pconfig['subnet'] = $wancfg['subnet'];
- $pconfig['gateway'] = $wancfg['gateway'];
+ $pconfig['gateway'] = $config['system']['gateway'];
$pconfig['pointtopoint'] = $wancfg['pointtopoint'];
}
@@ -175,7 +175,7 @@ if ($_POST) {
unset($wancfg['ipaddr']);
unset($wancfg['subnet']);
- unset($wancfg['gateway']);
+ unset($config['system']['gateway']);
unset($wancfg['pointtopoint']);
unset($wancfg['dhcphostname']);
unset($config['pppoe']['username']);
@@ -199,7 +199,7 @@ if ($_POST) {
if ($_POST['type'] == "Static") {
$wancfg['ipaddr'] = $_POST['ipaddr'];
$wancfg['subnet'] = $_POST['subnet'];
- $wancfg['gateway'] = $_POST['gateway'];
+ $config['system']['gateway'] = $_POST['gateway'];
if (isset($wancfg['ispointtopoint']))
$wancfg['pointtopoint'] = $_POST['pointtopoint'];
} else if ($_POST['type'] == "DHCP") {
OpenPOWER on IntegriCloud