diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-08-15 15:36:23 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-08-15 15:36:23 +0200 |
commit | a2b290b81adfbe7e619cf82101bdd1c13de64566 (patch) | |
tree | d4213021eb68590343bd5e78691129c37cc3b717 | |
parent | 8dec3ca378062e538dd97eba1712338bbebc8f33 (diff) | |
download | netctl-a2b290b81adfbe7e619cf82101bdd1c13de64566.tar.gz netctl-a2b290b81adfbe7e619cf82101bdd1c13de64566.tar.xz |
Add option ESSID_TYPE=hex to support hexadecimal ESSIDs (FS#24333)
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | docs/examples/wireless-wpa | 5 | ||||
-rw-r--r-- | docs/netcfg-profiles.txt | 7 | ||||
-rw-r--r-- | src/8021x | 14 |
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) @@ -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 |