From c924335ade13e248567a0089c0a0129ca3c8b371 Mon Sep 17 00:00:00 2001 From: Quentin Feraboli Date: Thu, 30 Jan 2025 09:19:42 +0100 Subject: [PATCH] AP: Include the Probe Request frame inside RX_PROBE_REQUEST event If notify_mgmt_frames is enabled, send the frame as a hexadecimal string in the RX_PROBE_REQUEST events similarly to the AP-MGMT-FRAME-RECEIVED events. Signed-off-by: Quentin Feraboli --- src/ap/beacon.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 95332dae2..95235aee4 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -1432,6 +1432,7 @@ void handle_probe_req(struct hostapd_data *hapd, size_t csa_offs_len; struct radius_sta rad_info; struct probe_resp_params params; + char *hex = NULL; #ifdef CONFIG_IEEE80211BE int mld_id; u16 links; @@ -1664,8 +1665,20 @@ void handle_probe_req(struct hostapd_data *hapd, if (hapd != hostapd_mbssid_get_tx_bss(hapd) && res != EXACT_SSID_MATCH) return; + if (hapd->conf->notify_mgmt_frames) { + size_t hex_len; + + hex_len = len * 2 + 1; + hex = os_malloc(hex_len); + if (hex) + wpa_snprintf_hex(hex, hex_len, (const u8 *) mgmt, len); + } + wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, RX_PROBE_REQUEST "sa=" MACSTR - " signal=%d", MAC2STR(mgmt->sa), ssi_signal); + " signal=%d%s%s", MAC2STR(mgmt->sa), ssi_signal, + hex ? " buf=" : "", hex ? hex : ""); + + os_free(hex); os_memset(¶ms, 0, sizeof(params)); -- 2.47.2