From fd9209549114c6227c33c4f6487b49345e535069 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 10 Jan 2018 22:14:22 +0200 Subject: [PATCH] DPP: Report reception of Config Request to upper layers This is mainly for protocol testing purposes. Signed-off-by: Jouni Malinen --- src/ap/dpp_hostapd.c | 2 ++ src/common/wpa_ctrl.h | 1 + wpa_supplicant/dpp_supplicant.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c index a606a7da1..47b23b92e 100644 --- a/src/ap/dpp_hostapd.c +++ b/src/ap/dpp_hostapd.c @@ -1731,6 +1731,8 @@ hostapd_dpp_gas_req_handler(struct hostapd_data *hapd, const u8 *sa, wpa_hexdump(MSG_DEBUG, "DPP: Received Configuration Request (GAS Query Request)", query, query_len); + wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_REQ_RX "src=" MACSTR, + MAC2STR(sa)); resp = dpp_conf_req_rx(auth, query, query_len); if (!resp) wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_FAILED); diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index c5209883d..604a40e6d 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -176,6 +176,7 @@ extern "C" { #define DPP_EVENT_FAIL "DPP-FAIL " #define DPP_EVENT_PKEX_T_LIMIT "DPP-PKEX-T-LIMIT " #define DPP_EVENT_INTRO "DPP-INTRO " +#define DPP_EVENT_CONF_REQ_RX "DPP-CONF-REQ-RX " /* MESH events */ #define MESH_GROUP_STARTED "MESH-GROUP-STARTED " diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 6e947ed77..4deb8c95a 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -2048,6 +2048,8 @@ wpas_dpp_gas_req_handler(void *ctx, const u8 *sa, const u8 *query, wpa_hexdump(MSG_DEBUG, "DPP: Received Configuration Request (GAS Query Request)", query, query_len); + wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_REQ_RX "src=" MACSTR, + MAC2STR(sa)); resp = dpp_conf_req_rx(auth, query, query_len); if (!resp) wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED);