SSIDs may contain UTF8 characters but ideally hostapd should be told
this is the case so it can advertise the fact. Default enable this
option.

add uci option utf8_ssid '0'/'1' for disable/enable e.g.

config wifi-iface
        option utf8_ssid '0'

Signed-off-by: Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
---
 package/network/services/hostapd/Makefile         | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index bf9a64419d..45c394640d 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 540d1182cc..7f3157cd27 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -168,7 +168,7 @@ EOF
 
 hostapd_common_add_bss_config() {
        config_add_string 'bssid:macaddr' 'ssid:string'
-       config_add_boolean wds wmm uapsd hidden
+       config_add_boolean wds wmm uapsd hidden utf8_ssid
 
        config_add_int maxassoc max_inactivity
        config_add_boolean disassoc_low_ack isolate short_preamble
@@ -258,7 +258,7 @@ hostapd_set_bss_options() {
                maxassoc max_inactivity disassoc_low_ack isolate auth_cache \
                wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 
wps_ap_setup_locked \
                wps_independent wps_device_type wps_device_name 
wps_manufacturer wps_pin \
-               macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
+               macfilter ssid utf8_ssid wmm uapsd hidden short_preamble 
rsn_preauth \
                iapp_interface eapol_version dynamic_vlan ieee80211w nasid \
                acct_server acct_secret acct_port acct_interval \
                bss_load_update_period chan_util_avg_period sae_require_mfp
@@ -277,6 +277,7 @@ hostapd_set_bss_options() {
        set_default acct_port 1813
        set_default bss_load_update_period 60
        set_default chan_util_avg_period 600
+       set_default utf8_ssid 1
        
        append bss_conf "ctrl_interface=/var/run/hostapd"
        if [ "$isolate" -gt 0 ]; then
@@ -296,6 +297,7 @@ hostapd_set_bss_options() {
        append bss_conf "wmm_enabled=$wmm" "$N"
        append bss_conf "ignore_broadcast_ssid=$hidden" "$N"
        append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
+       append bss_conf "utf8_ssid=$utf8_ssid" "$N"
 
        [ "$tdls_prohibit" -gt 0 ] && append bss_conf 
"tdls_prohibit=$tdls_prohibit" "$N"
 
-- 
2.17.2 (Apple Git-113)


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to