aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-05-25 15:41:04 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-25 15:42:00 (GMT)
commitd52067a5b6c3af1439a5edf7c8b09b4f1f45213c (patch)
tree2b5b8b405f3440582e8e23bcf6a80cd00b3c19c8
parent52579be860d389dc298db8b52e05ff7cdfc090e6 (diff)
downloadhostap-d52067a5b6c3af1439a5edf7c8b09b4f1f45213c.zip
hostap-d52067a5b6c3af1439a5edf7c8b09b4f1f45213c.tar.gz
hostap-d52067a5b6c3af1439a5edf7c8b09b4f1f45213c.tar.bz2
OCV: Report validation errors for SA Query Request/Response in AP mode
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>
-rw-r--r--src/ap/ieee802_11_shared.c7
-rw-r--r--src/common/wpa_ctrl.h4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index 9f2ec77..ba8f2cf 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -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;
}
}
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index 354de28..488e4ad 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -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