diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c index eaf97c3e8..d5e10debf 100644 --- a/wlantest/rx_eapol.c +++ b/wlantest/rx_eapol.c @@ -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); }