summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-27 00:28:07 +0000
committerErmal <eri@pfsense.org>2010-03-27 00:28:07 +0000
commit6a68854775c9cabe7839115ece7aad9cfcedb60a (patch)
treea31c4e94a84002c5ff5896f1df4ed5542d5d0b10
parent65a82e32a8750980361f59ddf64b234599b5ab2b (diff)
downloadpfsense-6a68854775c9cabe7839115ece7aad9cfcedb60a.zip
pfsense-6a68854775c9cabe7839115ece7aad9cfcedb60a.tar.gz
Make lan/wan behave as all other interfaces.
-rw-r--r--conf.default/config.xml2
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/upgrade_config.inc7
-rwxr-xr-xusr/local/www/interfaces.php15
4 files changed, 11 insertions, 15 deletions
diff --git a/conf.default/config.xml b/conf.default/config.xml
index c7a25cd..29e2e0a 100644
--- a/conf.default/config.xml
+++ b/conf.default/config.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- pfSense default system configuration -->
<pfsense>
- <version>5.8</version>
+ <version>6.1</version>
<lastchange></lastchange>
<theme>pfsense_ng</theme>
<sysctl>
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 72b01b6..3e21ca6 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -87,7 +87,7 @@ $g = array(
"disablethemeselection" => false,
"disablehelpmenu" => false,
"debug" => false,
- "latest_config" => "6.0",
+ "latest_config" => "6.1",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "105",
"minimum_ram_warning_text" => "128 MB",
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 0b09b00..e3a650f 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -1851,6 +1851,13 @@ function upgrade_059_to_060() {
}
}
+function upgrade_060_to_061() {
+ global $config;
+ if (is_array($config['interfaces']['wan']))
+ $config['interfaces']['wan']['enable'] = true;
+ if (is_array($config['interfaces']['lan']))
+ $config['interfaces']['lan']['enable'] = true;
+}
?>
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 11fab26..58304d6 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -161,10 +161,7 @@ if($if == "wan" && !$wancfg['descr']) {
}
$pconfig['descr'] = remove_bad_chars($wancfg['descr']);
-if ($if == "wan" || $if == "lan")
- $pconfig['enable'] = true;
-else
- $pconfig['enable'] = isset($wancfg['enable']);
+$pconfig['enable'] = isset($wancfg['enable']);
if (is_array($config['aliases']['alias'])) {
foreach($config['aliases']['alias'] as $alias) {
@@ -491,11 +488,7 @@ if ($_POST) {
unset($wancfg['remote']);
$wancfg['descr'] = remove_bad_chars($_POST['descr']);
- if ($if == "wan" || $if == "lan") {
- $wancfg['enable'] = true;
- } else {
- $wancfg['enable'] = $_POST['enable'] == "yes" ? true : false;
- }
+ $wancfg['enable'] = $_POST['enable'] == "yes" ? true : false;
/* for dynamic interfaces we tack a gateway item onto the array to prevent system
* log messages from appearing. They can also manually add these items */
@@ -915,7 +908,6 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
<tr>
<td colspan="2" valign="top" class="listtopic">General configuration</td>
</tr>
- <?php if ($if != "wan" && $if != "lan"): ?>
<tr>
<td width="22%" valign="top" class="vncell">Enable</td>
<td width="78%" class="vtable">
@@ -923,9 +915,6 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
<strong>Enable Interface</strong>
</td>
</tr>
- <?php else: ?>
- <input name="enable" type="hidden" value="yes">
- <?php endif; ?>
</table>
<div style="display:none;" name="allcfg" id="allcfg">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
OpenPOWER on IntegriCloud