From d93df9989f5d31b0752165b258a7dbc3f63242c2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 26 Jun 2020 20:37:30 +0300 Subject: [PATCH] DPP2: Debug print reason for rejecting reconfiguration This makes it easier to understand why Reconfig Authentication Request gets ignored. Signed-off-by: Jouni Malinen --- wpa_supplicant/dpp_supplicant.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 801e372bb..6e1ff7aa5 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -2101,17 +2101,29 @@ wpas_dpp_rx_reconfig_auth_req(struct wpa_supplicant *wpa_s, const u8 *src, wpa_printf(MSG_DEBUG, "DPP: Reconfig Authentication Request from " MACSTR, MAC2STR(src)); - if (!wpa_s->dpp || wpa_s->dpp_auth || - !wpa_s->dpp_reconfig_announcement || !wpa_s->dpp_reconfig_ssid) + if (!wpa_s->dpp) return; + if (wpa_s->dpp_auth) { + wpa_printf(MSG_DEBUG, + "DPP: Not ready for reconfiguration - pending authentication exchange in progress"); + return; + } + if (!wpa_s->dpp_reconfig_announcement || !wpa_s->dpp_reconfig_ssid) { + wpa_printf(MSG_DEBUG, + "DPP: Not ready for reconfiguration - not requested"); + return; + } for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) { if (ssid == wpa_s->dpp_reconfig_ssid && ssid->id == wpa_s->dpp_reconfig_ssid_id) break; } if (!ssid || !ssid->dpp_connector || !ssid->dpp_netaccesskey || - !ssid->dpp_csign) + !ssid->dpp_csign) { + wpa_printf(MSG_DEBUG, + "DPP: Not ready for reconfiguration - no matching network profile with Connector found"); return; + } auth = dpp_reconfig_auth_req_rx(wpa_s->dpp, wpa_s, ssid->dpp_connector, ssid->dpp_netaccesskey,