From b9983b35db8ac4466cd40d2fbe2b4ec7a9c98293 Mon Sep 17 00:00:00 2001 From: Daniel Gabay Date: Tue, 26 Dec 2023 11:45:23 +0200 Subject: [PATCH] MSCS: Process unsolciited MSCS Response frames Align MSCS response handling as described in IEEE P802.11-REVme/D4.0, 11.25.3 (MSCS procedures): AP may send unsolicited MSCS Response frame using dialog_token == 0. Instead of dropping the frame due to dialog_token mismatch, accept it and set the status accordingly. Signed-off-by: Daniel Gabay --- wpa_supplicant/robust_av.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/robust_av.c b/wpa_supplicant/robust_av.c index 993c2a475..a3edf3bee 100644 --- a/wpa_supplicant/robust_av.c +++ b/wpa_supplicant/robust_av.c @@ -740,7 +740,15 @@ void wpas_handle_robust_av_recv_action(struct wpa_supplicant *wpa_s, dialog_token = *buf++; len--; - if (dialog_token != wpa_s->robust_av.dialog_token) { + + /* AP sets dialog token to 0 for unsolicited response */ + if (!dialog_token && !wpa_s->mscs_setup_done) { + wpa_printf(MSG_INFO, + "MSCS: Drop unsolicited received frame: inactive"); + return; + } + + if (dialog_token && dialog_token != wpa_s->robust_av.dialog_token) { wpa_printf(MSG_INFO, "MSCS: Drop received frame due to dialog token mismatch: received:%u expected:%u", dialog_token, wpa_s->robust_av.dialog_token);