From d73b3f2ea026617a6c6aaa2319a62ca6c5d3773f Mon Sep 17 00:00:00 2001 From: Jason Abele Date: Mon, 1 Sep 2014 00:23:32 -0400 Subject: [PATCH] mesh: Use mesh id instead of SSID in BSS table Signed-off-by: Javier Lopez Signed-off-by: Jason Abele --- wpa_supplicant/bss.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 7d01a5f01..9b9289fc8 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -593,7 +593,7 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, struct wpa_scan_res *res, struct os_reltime *fetch_time) { - const u8 *ssid, *p2p; + const u8 *ssid, *p2p, *mesh; struct wpa_bss *bss; if (wpa_s->conf->ignore_old_scan_res) { @@ -643,6 +643,11 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, /* TODO: add option for ignoring BSSes we are not interested in * (to save memory) */ + + mesh = wpa_scan_get_ie(res, WLAN_EID_MESH_ID); + if (mesh && mesh[1] <= 32) + ssid = mesh; + bss = wpa_bss_get(wpa_s, res->bssid, ssid + 2, ssid[1]); if (bss == NULL) bss = wpa_bss_add(wpa_s, ssid + 2, ssid[1], res, fetch_time);