summaryrefslogtreecommitdiff
path: root/package/hostapd
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-10-27 11:11:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-10-27 11:11:04 +0000
commit0280ac8c92f1797131fbff83d03d39e74294c771 (patch)
tree17c31fe1d23890c0d285554bb8416a77b4455995 /package/hostapd
parentffc84cf75c15ef96245cecccbef1c4ecded144a9 (diff)
downloadmtk-20170518-0280ac8c92f1797131fbff83d03d39e74294c771.zip
mtk-20170518-0280ac8c92f1797131fbff83d03d39e74294c771.tar.gz
mtk-20170518-0280ac8c92f1797131fbff83d03d39e74294c771.tar.bz2
Set auth_algs in hostapd.conf, make it configurable for WEP Always set auth_algs in hostapd.conf. For WEP, auth_algs is configurable by setting the encryption parameter of a wifi-iface to contain "open" (1, open system), "shared" (2, shared key), or "mixed" (3, permits both open system and shared key.) For example, use "wep+shared" for shared key authentication. The default is default is "open" as it is more secure than "shared" (although WEP is pretty weak regardless.) For non-WEP, "open" is always used.
https://dev.openwrt.org/ticket/8120 Signed-off-by: Mark Mentovai <mark@moxienet.com> SVN-Revision: 23655
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/files/hostapd.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh
index bc58b88..db08e7b 100644
--- a/package/hostapd/files/hostapd.sh
+++ b/package/hostapd/files/hostapd.sh
@@ -77,7 +77,6 @@ hostapd_set_bss_options() {
append "$var" "eapol_key_index_workaround=1" "$N"
append "$var" "radius_acct_interim_interval=300" "$N"
append "$var" "ieee8021x=1" "$N"
- append "$var" "auth_algs=1" "$N"
append "$var" "wpa_key_mgmt=WPA-EAP" "$N"
append "$var" "wpa_group_rekey=300" "$N"
append "$var" "wpa_gmk_rekey=640" "$N"
@@ -101,6 +100,14 @@ hostapd_set_bss_options() {
append "$var" "wep_default_key=0" "$N"
;;
esac
+ case "$enc" in
+ *shared*)
+ auth_algs=2
+ ;;
+ *mixed*)
+ auth_algs=3
+ ;;
+ esac
wpa=0
crypto=
;;
@@ -109,6 +116,7 @@ hostapd_set_bss_options() {
crypto=
;;
esac
+ append "$var" "auth_algs=${auth_algs:-1}" "$N"
append "$var" "wpa=$wpa" "$N"
[ -n "$crypto" ] && append "$var" "wpa_pairwise=$crypto" "$N"
[ -n "$wpa_group_rekey" ] && append "$var" "wpa_group_rekey=$wpa_group_rekey" "$N"