]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MSCS: Reject MSCS ADD request when the MSCS session already is active
authorShubham Joshi <shujosh@qti.qualcomm.com>
Fri, 7 Nov 2025 11:19:01 +0000 (16:49 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 25 Nov 2025 13:34:29 +0000 (15:34 +0200)
Add a check to block sending an MSCS ADD request if an MSCS session is
already active as this may lead to termination of the existing MSCS
session. This prevents termination of an existing MSCS session and
ensures robust handling of MSCS requests.

Also log a clear message indicating the reason for rejection.

Signed-off-by: Shubham Joshi <shujosh@qti.qualcomm.com>
wpa_supplicant/robust_av.c

index 318fdf4baac4582d2f42bb76e54ff603e67989ce..76c576e51d60e0c71ef987b71eb5329d4fc25ce7 100644 (file)
@@ -323,6 +323,13 @@ int wpas_send_mscs_req(struct wpa_supplicant *wpa_s)
                return -1;
        }
 
+       if (wpa_s->mscs_setup_done &&
+           wpa_s->robust_av.request_type == SCS_REQ_ADD) {
+               wpa_msg(wpa_s, MSG_INFO,
+                       "MSCS: Failed to send MSCS ADD request: MSCS session already active");
+               return -1;
+       }
+
        if (!wpa_s->mscs_setup_done &&
            wpa_s->robust_av.request_type != SCS_REQ_ADD) {
                wpa_msg(wpa_s, MSG_INFO,