[PATCH v3 09/12] wpa_supplicant: SME: correct use of multi_ap_backhaul_sta

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the SME case when there are multiple SSIDs configured, we should use
the multi_ap_backhaul_sta setting of the current SSID, not arbitrarily
the first one.

Also, in general (e.g. when performing WPS) there may be no configured
SSID at all.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@xxxxxxx>
Cc: Venkateswara Naralasetty <vnaralas@xxxxxxxxxxxxxx>
---
I'm not 100% sure about this patch. But I tested it (with a single SSID)
and it still works. And it looks obvious to me that using the first
configured SSID makes no sense.
---
 wpa_supplicant/sme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 947095820..570aadfcf 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1547,7 +1547,7 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
 	}
 #endif /* CONFIG_OWE */
 
-	if (wpa_s->conf->ssid->multi_ap_backhaul_sta) {
+	if (wpa_s->current_ssid && wpa_s->current_ssid->multi_ap_backhaul_sta) {
 		size_t multi_ap_ie_len = add_multi_ap_ie(
 			wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len,
 			sizeof(wpa_s->sme.assoc_req_ie) - wpa_s->sme.assoc_req_ie_len,
-- 
2.19.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux