From 201725158915251a29de97f499d372ffe39f6d5f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 17 Oct 2005 19:04:14 +0000 Subject: Save and restore checkboxes correctly --- usr/local/www/interfaces_wlan.inc | 64 +++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 26 deletions(-) (limited to 'usr') diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc index 2e90016..518ed4c 100755 --- a/usr/local/www/interfaces_wlan.inc +++ b/usr/local/www/interfaces_wlan.inc @@ -137,11 +137,9 @@ function wireless_config_post() { $optcfg['wireless']['ssid'] = $_POST['ssid']; $optcfg['wireless']['stationname'] = $_POST['stationname']; $optcfg['wireless']['channel'] = $_POST['channel']; - - $optcfg['wireless']['authmode'] = $_POST['authmode']; - $optcfg['wireless']['hidessid']['enable'] = $_POST['hidessid_enable'] ? true : false; + $optcfg['wireless']['authmode'] = $_POST['authmode']; $optcfg['wireless']['txpower'] = $_POST['txpower']; - $optcfg['wireless']['wpa']['debug_mode'] = $_POST['debug_mode'] ? 1 : 0; + $optcfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl']; $optcfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs']; $optcfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode']; @@ -149,45 +147,59 @@ function wireless_config_post() { $optcfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise']; $optcfg['wireless']['wpa']['wpa_group_rekey'] = $_POST['wpa_group_rekey']; $optcfg['wireless']['wpa']['wpa_gmk_rekey'] = $_POST['wpa_gmk_rekey']; - $optcfg['wireless']['wpa']['wpa_strict_rekey'] = $_POST['wpa_strict_rekey'] ? 1 : 0; $optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase']; - $optcfg['wireless']['wpa']['ieee8021x']['enable'] = $_POST['ieee8021x_enable'] ? 1 : 0; $optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw']; - if($_POST['wpa_enable']) + if($_POST['hidessid_enable'] == "yes") + $optcfg['wireless']['hidessid']['enable'] = true; + else + unset($optcfg['wireless']['hidessid']['enable']); + + if($_POST['ieee8021x_enable'] == "yes") + $optcfg['wireless']['wpa']['ieee8021x']['enable'] = true; + else + unset($optcfg['wireless']['wpa']['ieee8021x']['enable']); + + if($_POST['wpa_strict_rekey'] == "yes") + $optcfg['wireless']['wpa']['wpa_strict_rekey'] = true; + else + unset($optcfg['wireless']['wpa']['wpa_strict_rekey']); + + if($_POST['debug_mode'] == "yes") + $optcfg['wireless']['wpa']['debug_mode'] = true; + else + unset($optcfg['wireless']['wpa']['debug_mode']); + + if($_POST['wpa_enable'] == "yes") $optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true; else unset($optcfg['wireless']['wpa']['enable']); - if($_POST['wep_enable']) + if($_POST['wep_enable'] == "yes") $optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true; else unset($optcfg['wireless']['wep']['enable']); - if($_POST['wme_enable']) + if($_POST['wme_enable'] == "yes") $optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true; else unset($optcfg['wireless']['wme']['enable']); - if($_POST['pureg_enable']) + if($_POST['pureg_enable'] == "yes") $optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] = true; else unset($optcfg['wireless']['pureg']['enable']); - if($_POST['apbridge_enable']) + if($_POST['apbridge_enable'] == "yes") $optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true; else unset($optcfg['wireless']['apbridge']['enable']); - if($_POST['turbo_enable']) + if($_POST['turbo_enable'] == "yes") $optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] = true; else unset($optcfg['wireless']['turbo']['enable']); - - - - $optcfg['wireless']['wep']['key'] = array(); for ($i = 1; $i <= 4; $i++) { @@ -252,13 +264,13 @@ function wireless_config_print() { 802.11g only - > + >
When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate). Allow intra-BSS communication - > + >
When operating as an access point, enable this if you want to pass packets between wireless clients directly.
@@ -267,20 +279,20 @@ function wireless_config_print() { Enable turbo mode - > + >
Setting this option will force the card to use turbo mode.
use "ifconfig interface list channel" to list turbo capable channels. Enable WME - > + >
Setting this option will force the card to use WME (wireless QoS). Enable Hide SSID - > + >
Setting this option will force the card to NOT broadcast it's SSID
@@ -327,7 +339,7 @@ function wireless_config_print() { WEP - > + > Enable WEP @@ -365,7 +377,7 @@ function wireless_config_print() { -
WPA> + > Enable WPA

@@ -403,7 +415,7 @@ function wireless_config_print() { - - - -- cgit v1.1
Enable MAC Filtering> + > Setting this option will enable the use of a mac filterlist to allow deny association based on mac address

Strict Key Regeneration> + >
Setting this option will force the AP to rekey whenever a client disassociates.
Enable IEEE802.1X> + >
Setting this option will enable 802.1x authentication.