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:
Jouni Malinen 2017-10-22 12:10:47 +03:00 committed by Jouni Malinen
parent 27fefbbb76
commit a707393494
3 changed files with 21 additions and 2 deletions

View file

@ -1567,11 +1567,20 @@ void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
if (crypto_suite != 1) {
wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
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;
}
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;
}
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_RX "src=" MACSTR " freq=%u type=%d",
MAC2STR(src), freq, type);
switch (type) {
case DPP_PA_AUTHENTICATION_REQ: