wlantest: Fix broadcast EAPOL-Key frame handling

This resulted in an attempt to dereference a NULL pointer since sta_addr
is not known in this type of a case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
master
Jouni Malinen 3 years ago committed by Jouni Malinen
parent a826ff2d95
commit 32360ad498

@ -1056,7 +1056,10 @@ static void rx_data_eapol_key(struct wlantest *wt, const u8 *bssid,
bss = bss_get(wt, bssid);
if (bss) {
sta = sta_get(bss, sta_addr);
if (sta_addr)
sta = sta_get(bss, sta_addr);
else
sta = NULL;
if (sta)
mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
}

Loading…
Cancel
Save