summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2023-04-13 22:56:10 +0200
committercos <cos>2023-04-13 22:59:50 +0200
commit3be9407483439e27b0599f0bfe6b26f0012acacb (patch)
treeab644fa6cb16d75bf4cd411a25b9cfb644399621
parent4f5eaac12a6cb578eeb21fea383dcba6409d10f4 (diff)
downloadalpine-conf-fix/utf8_ssid.zip
setup-interfaces: find essids when UTF-8 SSID capability presentfix/utf8_ssid
When a essid has the 'UTF-8 SSID' extended capibility, the `find_essids` function will not return that ssid. This bug is very similar to the one fixed in commit 6c9955e, and solved by ensuring nothing but whitespace precedes the matched key in the regex. Partial output of `iw dev wlan0 scan`: ``` Extended capabilities: * Extended Channel Switching * UTF-8 SSID * Operating Mode Notification ```
-rw-r--r--setup-interfaces.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index 6ffcdd5..b44b5af 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -124,7 +124,7 @@ find_essids() {
$MOCK ip link set dev "$iface" up
(iw dev wlan0 scan; echo BSS) | awk -F": " '
/^BSS/ { if (ssid) { print ssid "/" auth }; ssid=""; auth="" }
- $1 ~ /SSID$/ { ssid=$2 }
+ $1 ~ /^[[:blank:]]*SSID$/ { ssid=$2 }
$1 ~ /Authentication suites/ { auth=$2 }' \
| grep -E -v '(802.1x|\\x00)' | sort -u >"$essids_list"
if [ -s "$essids_list" ]; then