Parcourir la source

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 <jouni@qca.qualcomm.com>
Jouni Malinen il y a 7 ans
Parent
commit
da143f7fb9
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      wpa_supplicant/events.c

+ 4 - 3
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,