DPP: Report received messages as control interface events
This is helpful for testing purposes and also for upper layer components that may want to show more detailed progress through a DPP exchange. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
27fefbbb76
commit
a707393494
3 changed files with 21 additions and 2 deletions
|
@ -1184,11 +1184,20 @@ void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src,
|
||||||
if (crypto_suite != 1) {
|
if (crypto_suite != 1) {
|
||||||
wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
|
wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
|
||||||
crypto_suite);
|
crypto_suite);
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
|
||||||
|
" freq=%u type=%d ignore=unsupported-crypto-suite",
|
||||||
|
MAC2STR(src), freq, type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wpa_hexdump(MSG_MSGDUMP, "DPP: Received message attributes", buf, len);
|
wpa_hexdump(MSG_MSGDUMP, "DPP: Received message attributes", buf, len);
|
||||||
if (dpp_check_attrs(buf, len) < 0)
|
if (dpp_check_attrs(buf, len) < 0) {
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
|
||||||
|
" freq=%u type=%d ignore=invalid-attributes",
|
||||||
|
MAC2STR(src), freq, type);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
|
||||||
|
" freq=%u type=%d", MAC2STR(src), freq, type);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DPP_PA_AUTHENTICATION_REQ:
|
case DPP_PA_AUTHENTICATION_REQ:
|
||||||
|
|
|
@ -167,6 +167,7 @@ extern "C" {
|
||||||
#define DPP_EVENT_NET_ACCESS_KEY "DPP-NET-ACCESS-KEY "
|
#define DPP_EVENT_NET_ACCESS_KEY "DPP-NET-ACCESS-KEY "
|
||||||
#define DPP_EVENT_MISSING_CONNECTOR "DPP-MISSING-CONNECTOR "
|
#define DPP_EVENT_MISSING_CONNECTOR "DPP-MISSING-CONNECTOR "
|
||||||
#define DPP_EVENT_NETWORK_ID "DPP-NETWORK-ID "
|
#define DPP_EVENT_NETWORK_ID "DPP-NETWORK-ID "
|
||||||
|
#define DPP_EVENT_RX "DPP-RX "
|
||||||
|
|
||||||
/* MESH events */
|
/* MESH events */
|
||||||
#define MESH_GROUP_STARTED "MESH-GROUP-STARTED "
|
#define MESH_GROUP_STARTED "MESH-GROUP-STARTED "
|
||||||
|
|
|
@ -1567,11 +1567,20 @@ void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
|
||||||
if (crypto_suite != 1) {
|
if (crypto_suite != 1) {
|
||||||
wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
|
wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
|
||||||
crypto_suite);
|
crypto_suite);
|
||||||
|
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
|
||||||
|
" freq=%u type=%d ignore=unsupported-crypto-suite",
|
||||||
|
MAC2STR(src), freq, type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wpa_hexdump(MSG_MSGDUMP, "DPP: Received message attributes", buf, len);
|
wpa_hexdump(MSG_MSGDUMP, "DPP: Received message attributes", buf, len);
|
||||||
if (dpp_check_attrs(buf, len) < 0)
|
if (dpp_check_attrs(buf, len) < 0) {
|
||||||
|
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
|
||||||
|
" freq=%u type=%d ignore=invalid-attributes",
|
||||||
|
MAC2STR(src), freq, type);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_RX "src=" MACSTR " freq=%u type=%d",
|
||||||
|
MAC2STR(src), freq, type);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DPP_PA_AUTHENTICATION_REQ:
|
case DPP_PA_AUTHENTICATION_REQ:
|
||||||
|
|
Loading…
Reference in a new issue