From da143f7fb91e61db7a3946cbaa527fae57a35ac1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 19 Jun 2017 21:34:10 +0300 Subject: [PATCH] FILS: Fix EVENT_ASSOC processing checks for driver-SME Commit 5538fc930988bfc12935579b2b9930d18ffd1be8 ('FILS: Track completion with FILS shared key authentication offload') added an additional case for calling wpa_supplicant_event_assoc_auth() from EVENT_ASSOC handling in case of FILS-completion with driver-based-SME. However, that checked what placed outside the data != NULL case while data != NULL needs to apply for this case as well due to wpa_supplicant_event_assoc_auth() behavior. Move the data != NULL check to apply to both cases to avoid potentially issues if a driver interface were to return EVENT_ASSOC without the associate data. (CID 164708) Signed-off-by: Jouni Malinen --- wpa_supplicant/events.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 314d8f85e..5b053c156 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3764,9 +3764,10 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, } #endif /* CONFIG_TESTING_OPTIONS */ wpa_supplicant_event_assoc(wpa_s, data); - if ((data && data->assoc_info.authorized) || - (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) && - wpa_fils_is_completed(wpa_s->wpa))) + if (data && + (data->assoc_info.authorized || + (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) && + wpa_fils_is_completed(wpa_s->wpa)))) wpa_supplicant_event_assoc_auth(wpa_s, data); if (data) { wpa_msg(wpa_s, MSG_INFO,