nl80211: handle hidden SSIDs in wpa_supplicant scan results

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-10-16 16:40:41 +02:00
parent 3ac846e7dc
commit 07315b6fdb

View file

@ -2560,7 +2560,7 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len)
flags = strtok(NULL, "\t"); flags = strtok(NULL, "\t");
ssid = strtok(NULL, "\n"); ssid = strtok(NULL, "\n");
if (!bssid || !freq || !signal || !flags || !ssid) if (!bssid || !freq || !signal || !flags)
continue; continue;
/* BSSID */ /* BSSID */
@ -2572,7 +2572,10 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len)
e->mac[5] = strtol(&bssid[15], NULL, 16); e->mac[5] = strtol(&bssid[15], NULL, 16);
/* SSID */ /* SSID */
if (ssid)
wpasupp_ssid_decode(ssid, e->ssid, sizeof(e->ssid)); wpasupp_ssid_decode(ssid, e->ssid, sizeof(e->ssid));
else
e->ssid[0] = 0;
/* Mode */ /* Mode */
if (strstr(flags, "[MESH]")) if (strstr(flags, "[MESH]"))