summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorMatt Smith <mgsmith@netgate.com>2015-10-22 13:08:13 -0500
committerMatt Smith <mgsmith@netgate.com>2015-10-22 13:13:32 -0500
commitb061a3c61ced43cf746a4439b2370a03efccab0d (patch)
tree57f5cd2502c5130d0d6cd61679b61ce6ebd9ffa0 /src/etc
parentdb1cc32f5ad36be20896e5688a810065efd7e6bc (diff)
downloadpfsense-b061a3c61ced43cf746a4439b2370a03efccab0d.zip
pfsense-b061a3c61ced43cf746a4439b2370a03efccab0d.tar.gz
Remove config stuff for WEP. on upgrade, disable WEP on interfaces that have it configured and disable those interfaces and generate a notice. Fixes #5123.
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/globals.inc2
-rw-r--r--src/etc/inc/interfaces.inc25
-rw-r--r--src/etc/inc/upgrade_config.inc22
3 files changed, 25 insertions, 24 deletions
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc
index 32b25ca..286b00e 100644
--- a/src/etc/inc/globals.inc
+++ b/src/etc/inc/globals.inc
@@ -74,7 +74,7 @@ $g = array(
"disablecrashreporter" => false,
"crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
- "latest_config" => "12.3",
+ "latest_config" => "12.4",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index f7e60a6..9185738 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -2639,29 +2639,8 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) {
$wlcmd[] = "-wme";
}
- /* set up wep if enabled */
- $wepset = "";
- if (isset($wlcfg['wep']['enable']) && is_array($wlcfg['wep']['key'])) {
- switch ($wlcfg['wpa']['auth_algs']) {
- case "1":
- $wepset .= "authmode open wepmode on ";
- break;
- case "2":
- $wepset .= "authmode shared wepmode on ";
- break;
- case "3":
- $wepset .= "authmode mixed wepmode on ";
- }
- $i = 1;
- foreach ($wlcfg['wep']['key'] as $wepkey) {
- $wepset .= "wepkey " . escapeshellarg("{$i}:{$wepkey['value']}") . " ";
- if (isset($wepkey['txkey'])) {
- $wlcmd[] = "weptxkey {$i} ";
- }
- $i++;
- }
- $wlcmd[] = $wepset;
- } else if (isset($wlcfg['wpa']['enable'])) {
+ /* Enable wpa if it's configured. No WEP support anymore. */
+ if (isset($wlcfg['wpa']['enable'])) {
$wlcmd[] = "authmode wpa wepmode off ";
} else {
$wlcmd[] = "authmode open wepmode off ";
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index 6e43894..cfc92d2 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -3981,4 +3981,26 @@ function upgrade_122_123() {
}
}
+function upgrade_123_to_124() {
+ require_once("notices.inc");
+ global $config;
+
+ /* Find interfaces with WEP configured. */
+ foreach ($config['interfaces'] as $ifname => $intf) {
+ if (!is_array($intf['wireless'])) {
+ continue;
+ }
+
+ /* Generate a notice, disable interface, remove WEP settings */
+ if (isset($intf['wireless']['wep']['enable'])) {
+ file_notice("WirelessSettings", "WEP is no longer supported. It will be disabled on the {$ifname} interface and the interface will be disabled. Please reconfigure the interface.");
+ unset($config['interfaces'][$ifname]['wireless']['wep']);
+ if (isset($intf['enable'])) {
+ unset($config['interfaces'][$ifname]['enable']);
+ }
+ }
+ }
+}
+
+
?>
OpenPOWER on IntegriCloud