summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/examples/wireless-wpa5
-rw-r--r--docs/netcfg-profiles.txt7
-rw-r--r--src/8021x14
3 files changed, 24 insertions, 2 deletions
diff --git a/docs/examples/wireless-wpa b/docs/examples/wireless-wpa
index 20f5509..e2511f3 100644
--- a/docs/examples/wireless-wpa
+++ b/docs/examples/wireless-wpa
@@ -2,8 +2,13 @@ CONNECTION='wireless'
DESCRIPTION='A simple WPA encrypted wireless connection'
INTERFACE='wlan0'
SECURITY='wpa'
+
ESSID='MyNetwork'
+## Uncomment if the supplied ESSID is hexadecimal
+#ESSID_TYPE='hex'
KEY='WirelessKey'
+
IP='dhcp'
+
# Uncomment this if your ssid is hidden
#HIDDEN=yes
diff --git a/docs/netcfg-profiles.txt b/docs/netcfg-profiles.txt
index 5e11076..def2a37 100644
--- a/docs/netcfg-profiles.txt
+++ b/docs/netcfg-profiles.txt
@@ -159,7 +159,12 @@ SECURITY (required for security of 'wep', 'wpa', 'wpa-configsection' or 'wpa-con
KEY (required for SECURITY of 'wpa' or 'wep' only)
: Wireless encryption key.
ESSID (this or AP is required)
-: Name of network to connect to.
+: Name of network to connect to, or hexadecimal digits (see
+ 'ESSID_TYPE')
+ESSID_TYPE (optional, defaults to 'ascii')
+: Set to 'ascii' or 'hex', if set to 'hex', ESSID will be interpreted
+ as an hexadecimal SSID and written unquoted to the wpa_supplicant
+ configuration file.
AP (this or ESSID is required)
: AP (BSSID) of the network to connect to.
HIDDEN (optional)
diff --git a/src/8021x b/src/8021x
index 3de0a00..e2db408 100644
--- a/src/8021x
+++ b/src/8021x
@@ -186,7 +186,19 @@ make_wpa_config_file() {
make_wpa_config() {
case $SECURITY in
wep|wep-old|wpa|none|none-old)
- echo "ssid=\"$ESSID\""
+ case "${ESSID_TYPE:-ascii}" in
+ ascii)
+ echo "ssid=\"$ESSID\""
+ ;;
+ hex)
+ # Hex ESSID is written unquoted ans lowercase (FS#24333)
+ echo "ssid=${ESSID,,}"
+ ;;
+ *)
+ report_fail "ESSID_TYPE must be set to 'ascii' or 'hex'."
+ return 1
+ ;;
+ esac
if [[ -n "$AP" ]]; then
echo "bssid=${AP,,}"
fi