From 85d5456997bb76d7ba8e5cddcffd4fbbcf87a2c6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 1 May 2020 17:36:59 +0300 Subject: [PATCH] DPP2: Indicate if PFS was used in control interface STATUS The new "dpp_pfs=1" entry can be used to determine whether PFS was used during derivation of PTK when DPP AKM is negotiated for an association. Signed-off-by: Jouni Malinen --- src/rsn_supp/wpa.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 6077aa60a..605d40863 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -3292,6 +3292,15 @@ int wpa_sm_get_status(struct wpa_sm *sm, char *buf, size_t buflen, return pos - buf; pos += ret; +#ifdef CONFIG_DPP2 + if (sm->key_mgmt == WPA_KEY_MGMT_DPP && sm->dpp_z) { + ret = os_snprintf(pos, end - pos, "dpp_pfs=1\n"); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_DPP2 */ + if (sm->mfp != NO_MGMT_FRAME_PROTECTION && sm->ap_rsn_ie) { struct wpa_ie_data rsn; if (wpa_parse_wpa_ie_rsn(sm->ap_rsn_ie, sm->ap_rsn_ie_len, &rsn)