]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OCV: Report validation errors for SA Query Request/Response in AP mode
authorJouni Malinen <jouni@codeaurora.org>
Mon, 25 May 2020 15:41:04 +0000 (18:41 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 25 May 2020 15:42:00 +0000 (18:42 +0300)
Add a new OCV-FAILURE control interface event to notify upper layers of
OCV validation issues. This commit adds this for SA Query processing in
AP mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ieee802_11_shared.c
src/common/wpa_ctrl.h

index 9f2ec772eb69a43bb44cb79572b28647cdb1f993..ba8f2cf98498feb088568602ff4574675afdd74b 100644 (file)
@@ -11,6 +11,7 @@
 #include "utils/common.h"
 #include "common/ieee802_11_defs.h"
 #include "common/ocv.h"
+#include "common/wpa_ctrl.h"
 #include "hostapd.h"
 #include "sta_info.h"
 #include "ap_config.h"
@@ -255,7 +256,11 @@ void ieee802_11_sa_query_action(struct hostapd_data *hapd,
 
                if (ocv_verify_tx_params(elems.oci, elems.oci_len, &ci,
                                         tx_chanwidth, tx_seg1_idx) != 0) {
-                       wpa_printf(MSG_WARNING, "OCV failed: %s", ocv_errorstr);
+                       wpa_msg(hapd->msg_ctx, MSG_INFO, OCV_FAILURE "addr="
+                               MACSTR " frame=saquery%s error=%s",
+                               MAC2STR(sa),
+                               action_type == WLAN_SA_QUERY_REQUEST ?
+                               "req" : "resp", ocv_errorstr);
                        return;
                }
        }
index 354de2854c328b43b981df2f3e499739ef67c652..488e4addc6306ee07b56ec265113522ae850b97a 100644 (file)
@@ -388,6 +388,10 @@ extern "C" {
 /* Transition mode disabled indication - followed by bitmap */
 #define TRANSITION_DISABLE "TRANSITION-DISABLE "
 
+/* OCV validation failure; parameters: addr=<src addr>
+ * frame=<saqueryreq/saqueryresp> error=<error string> */
+#define OCV_FAILURE "OCV-FAILURE "
+
 #ifndef BIT
 #define BIT(x) (1U << (x))
 #endif