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>
This commit is contained in:
parent
a826ff2d95
commit
32360ad498
1 changed files with 4 additions and 1 deletions
|
@ -1056,7 +1056,10 @@ static void rx_data_eapol_key(struct wlantest *wt, const u8 *bssid,
|
||||||
|
|
||||||
bss = bss_get(wt, bssid);
|
bss = bss_get(wt, bssid);
|
||||||
if (bss) {
|
if (bss) {
|
||||||
|
if (sta_addr)
|
||||||
sta = sta_get(bss, sta_addr);
|
sta = sta_get(bss, sta_addr);
|
||||||
|
else
|
||||||
|
sta = NULL;
|
||||||
if (sta)
|
if (sta)
|
||||||
mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
|
mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue