]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RRM: Send a refuse reply if the measurement scan failed
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 12 Jun 2025 08:10:20 +0000 (10:10 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 21 Jun 2025 08:50:58 +0000 (11:50 +0300)
If the scan is aborted or missing the expected TSF BSSID, then still
send a REFUSED reply to the AP to let it know. It can request another
measurement if it wants to.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
wpa_supplicant/rrm.c

index 88241e7360f13034edf8de12c6b9bfcfd95adf32..d467ce6bf48230ed02461aab3f802882b4f0ece5 100644 (file)
@@ -1555,7 +1555,7 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
 
        /* If the measurement was aborted, don't report partial results */
        if (info->aborted)
-               goto out;
+               goto out_refuse;
 
        wpa_printf(MSG_DEBUG, "RRM: TSF BSSID: " MACSTR " current BSS: " MACSTR,
                   MAC2STR(info->scan_start_tsf_bssid),
@@ -1564,7 +1564,7 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
            !wpas_beacon_rep_scan_match(wpa_s, info->scan_start_tsf_bssid)) {
                wpa_printf(MSG_DEBUG,
                           "RRM: Ignore scan results due to mismatching TSF BSSID");
-               goto out;
+               goto out_refuse;
        }
 
        for (i = 0; i < scan_res->num; i++) {
@@ -1634,6 +1634,10 @@ int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
        wpas_rrm_send_msr_report(wpa_s, buf);
        wpabuf_free(buf);
 
+       goto out;
+
+out_refuse:
+       wpas_rrm_refuse_request(wpa_s);
 out:
        wpas_clear_beacon_rep_data(wpa_s);
        return 1;