aboutsummaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/patches/180-fix_owe_ssid_update.patch
blob: 02ed2dedf110ff86478e00cd63db6475c064c03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2449,7 +2449,11 @@ static int hostapd_owe_iface_iter(struct
 		if (!bss->conf->ssid.ssid_set || !bss->conf->ssid.ssid_len ||
 		    is_zero_ether_addr(bss->own_addr))
 			continue;
-
+		if (!os_memcmp(hapd->conf->owe_transition_bssid, bss->own_addr, ETH_ALEN) &&
+		    hapd->conf->owe_transition_ssid_len == bss->conf->ssid.ssid_len &&
+		    !os_memcmp(hapd->conf->owe_transition_ssid, bss->conf->ssid.ssid,
+			       bss->conf->ssid.ssid_len))
+			return 0;
 		os_memcpy(hapd->conf->owe_transition_bssid, bss->own_addr,
 			  ETH_ALEN);
 		os_memcpy(hapd->conf->owe_transition_ssid,
@@ -2466,10 +2470,6 @@ static int hostapd_owe_iface_iter(struct
 
 int hostapd_owe_trans_get_info(struct hostapd_data *hapd)
 {
-	if (hapd->conf->owe_transition_ssid_len > 0 &&
-	    !is_zero_ether_addr(hapd->conf->owe_transition_bssid))
-		return 0;
-
 	/* Find transition mode SSID/BSSID information from a BSS operated by
 	 * this hostapd instance. */
 	if (!hapd->iface->interfaces ||