From: Jouni Malinen Date: Wed, 24 Aug 2022 15:31:54 +0000 (+0300) Subject: DPP: Do not discard network introduction frames in test mode X-Git-Tag: hostap_2_11~1772 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57968faea5b87ab5f6d43e50276bd047bd07c168;p=thirdparty%2Fhostap.git DPP: Do not discard network introduction frames in test mode dpp_discard_public_action=1 was not supposed to prevent network introduction, i.e., it was only for frames that could go through the DPP-over-TCP path. Fix this not to prevent network introduction when using DPP-over-TCP to configure a DPP AKM profile. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 994d183a9..d90a2924b 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -3884,13 +3884,6 @@ void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src, return; if (WPA_GET_BE24(buf) != OUI_WFA || buf[3] != DPP_OUI_TYPE) return; -#ifdef CONFIG_TESTING_OPTIONS - if (wpa_s->dpp_discard_public_action) { - wpa_printf(MSG_DEBUG, - "TESTING: Discard received DPP Public Action frame"); - return; - } -#endif /* CONFIG_TESTING_OPTIONS */ hdr = buf; buf += 4; len -= 4; @@ -3902,6 +3895,15 @@ void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src, "DPP: Received DPP Public Action frame crypto suite %u type %d from " MACSTR " freq=%u", crypto_suite, type, MAC2STR(src), freq); +#ifdef CONFIG_TESTING_OPTIONS + if (wpa_s->dpp_discard_public_action && + type != DPP_PA_PEER_DISCOVERY_RESP && + type != DPP_PA_PRIV_PEER_INTRO_NOTIFY) { + wpa_printf(MSG_DEBUG, + "TESTING: Discard received DPP Public Action frame"); + return; + } +#endif /* CONFIG_TESTING_OPTIONS */ if (crypto_suite != 1) { wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u", crypto_suite);