From: Shubham Joshi Date: Fri, 7 Nov 2025 11:19:01 +0000 (+0530) Subject: MSCS: Reject MSCS ADD request when the MSCS session already is active X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c0ff0cc59de95667690ae5389327d92b01e7e01;p=thirdparty%2Fhostap.git MSCS: Reject MSCS ADD request when the MSCS session already is active 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 --- diff --git a/wpa_supplicant/robust_av.c b/wpa_supplicant/robust_av.c index 318fdf4ba..76c576e51 100644 --- a/wpa_supplicant/robust_av.c +++ b/wpa_supplicant/robust_av.c @@ -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,