summaryrefslogtreecommitdiff
path: root/package/network
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2016-04-17 12:50:55 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2016-04-17 12:50:55 +0000
commit3830200d6ad8f0197ca4f8e0a99d3a043214de10 (patch)
treede57ee03d16ef9066973c404b5394c8ed2652f54 /package/network
parentca77367dae317ea79150e86decf6943e766c0745 (diff)
downloadmtk-20170518-3830200d6ad8f0197ca4f8e0a99d3a043214de10.zip
mtk-20170518-3830200d6ad8f0197ca4f8e0a99d3a043214de10.tar.gz
mtk-20170518-3830200d6ad8f0197ca4f8e0a99d3a043214de10.tar.bz2
hostapd.sh: Add support for "anonymous_identity" config field
The wpa_supplicant supports an "anonymous_identity" field, which some EAP networks require. From the documentation: anonymous_identity: Anonymous identity string for EAP (to be used as the unencrypted identity with EAP types that support different tunnelled identity, e.g., EAP-TTLS). This change modifies the hostapd.sh script to propagate this field from the UCI config to the wpa_supplicant.conf file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Reviewed-by: Manuel Munz <freifunk@somakoma.de> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49181
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/hostapd/files/netifd.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index ad96b8b..005112d 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -139,7 +139,7 @@ hostapd_common_add_bss_config() {
config_add_string nasid
config_add_string ownip
config_add_string iapp_interface
- config_add_string eap_type ca_cert client_cert identity auth priv_key priv_key_pwd
+ config_add_string eap_type ca_cert client_cert identity anonymous_identity auth priv_key priv_key_pwd
config_add_int dynamic_vlan vlan_naming
config_add_string vlan_tagged_interface vlan_bridge
@@ -623,9 +623,10 @@ wpa_supplicant_add_network() {
key_mgmt='WPA-EAP'
[ "$ieee80211r" -gt 0 ] && key_mgmt="FT-EAP $key_mgmt"
- json_get_vars eap_type identity ca_cert
+ json_get_vars eap_type identity anonymous_identity ca_cert
[ -n "$ca_cert" ] && append network_data "ca_cert=\"$ca_cert\"" "$N$T"
[ -n "$identity" ] && append network_data "identity=\"$identity\"" "$N$T"
+ [ -n "$anonymous_identity" ] && append network_data "anonymous_identity=\"$anonymous_identity\"" "$N$T"
case "$eap_type" in
tls)
json_get_vars client_cert priv_key priv_key_pwd