nl80211: handle Mesh ID IE
authorJo-Philipp Wich <jo@mein.io>
Mon, 23 Jul 2018 14:37:28 +0000 (16:37 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 23 Jul 2018 15:08:44 +0000 (17:08 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
iwinfo_nl80211.c

index 49a183199adea6a0bfd35874dead7cdd1d09daf7..d135d3010bcab583a368973eb3d46a97b9142c9e 100644 (file)
@@ -2074,9 +2074,12 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
                switch (ie[0])
                {
                case 0: /* SSID */
-                       len = min(ie[1], IWINFO_ESSID_MAX_SIZE);
-                       memcpy(e->ssid, ie + 2, len);
-                       e->ssid[len] = 0;
+               case 114: /* Mesh ID */
+                       if (e->ssid[0] == 0) {
+                               len = min(ie[1], IWINFO_ESSID_MAX_SIZE);
+                               memcpy(e->ssid, ie + 2, len);
+                               e->ssid[len] = 0;
+                       }
                        break;
 
                case 48: /* RSN */