From 9774dfbf62f41080267ebb0943015a9f6d1dc0cf Mon Sep 17 00:00:00 2001 From: Chung-Hsien Hsu Date: Mon, 20 May 2019 17:10:39 +0800 Subject: [PATCH] wpa_supplicant: Fix 802.1X 4-way handshake offload indication Commit d896874f8689 ("nl80211: Indicate 802.1X 4-way handshake offload in connect") used the req_key_mgmt_offload flag to indicate to the driver that it should offload the 802.1X handshake. However, the flag will be updated according to th configuration of proactive key caching and OKC if key management offload is considered (it is enabled by default now). Do not update the flag if it has been set for 802.1X 4-way handshake offload. Signed-off-by: Chung-Hsien Hsu --- wpa_supplicant/wpa_supplicant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 96a3691cf3cf..66ee268d861c 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -3221,8 +3221,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B || params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)) params.req_key_mgmt_offload = 1; + else + params.req_key_mgmt_offload = 0; - if (wpa_s->conf->key_mgmt_offload) { + if (wpa_s->conf->key_mgmt_offload && !params.req_key_mgmt_offload) { if (params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X || params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SHA256 || params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B || -- 2.1.0