[PATCH v3 4/5] SME: Accept authentication frame from an MLD AP

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Dec 6 01:46:08 PST 2022


The underline driver is expected to translate the link
addresses to MLD addresses when processing an authentication
frame from a MLD AP. Thus, accept authentication frame when
the peer matches the expected MLD address.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 wpa_supplicant/sme.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 2cc05f21c9..0a44824604 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1839,10 +1839,18 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
 	}
 
 	if (os_memcmp(wpa_s->pending_bssid, data->auth.peer, ETH_ALEN) != 0) {
-		wpa_dbg(wpa_s, MSG_DEBUG, "SME: Ignore authentication with "
-			"unexpected peer " MACSTR,
-			MAC2STR(data->auth.peer));
-		return;
+		bool fail = true;
+
+		if (wpa_s->valid_links &&
+		    !os_memcmp(wpa_s->ap_mld_addr, data->auth.peer, ETH_ALEN))
+			fail = false;
+
+		if (fail) {
+			wpa_dbg(wpa_s, MSG_DEBUG,
+				"SME: Ignore authentication with unexpected peer " MACSTR,
+				MAC2STR(data->auth.peer));
+			return;
+		}
 	}
 
 	wpa_dbg(wpa_s, MSG_DEBUG, "SME: Authentication response: peer=" MACSTR
-- 
2.25.1




More information about the Hostap mailing list