diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index d66d2e36a..6bbc3dacb 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1493,17 +1493,18 @@ static void mlme_event(struct i802_bss *bss, data = nla_data(frame); len = nla_len(frame); - if (len < 4 + ETH_ALEN) { + if (len < 4 + 2 * ETH_ALEN) { wpa_printf(MSG_MSGDUMP, "nl80211: MLME event %d on %s(" MACSTR ") - too short", cmd, bss->ifname, MAC2STR(bss->addr)); return; } wpa_printf(MSG_MSGDUMP, "nl80211: MLME event %d on %s(" MACSTR ") A1=" - MACSTR, cmd, bss->ifname, MAC2STR(bss->addr), - MAC2STR(data + 4)); + MACSTR " A2=" MACSTR, cmd, bss->ifname, MAC2STR(bss->addr), + MAC2STR(data + 4), MAC2STR(data + 4 + ETH_ALEN)); if (cmd != NL80211_CMD_FRAME_TX_STATUS && !(data[4] & 0x01) && - os_memcmp(bss->addr, data + 4, ETH_ALEN) != 0) { + os_memcmp(bss->addr, data + 4, ETH_ALEN) != 0 && + os_memcmp(bss->addr, data + 4 + ETH_ALEN, ETH_ALEN) != 0) { wpa_printf(MSG_MSGDUMP, "nl80211: %s: Ignore MLME frame event " "for foreign address", bss->ifname); return;