mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 01:19:23 +01:00
netdev: parse michael MIC failure message
This event indicates a security issue. The proper handling would be to rekey but for now at least provide some information to the user.
This commit is contained in:
parent
9f1fa53aae
commit
d4da6b5bec
17
src/netdev.c
17
src/netdev.c
@ -5174,6 +5174,20 @@ static void netdev_channel_switch_event(struct l_genl_msg *msg,
|
||||
&netdev->frequency, netdev->user_data);
|
||||
}
|
||||
|
||||
static void netdev_michael_mic_failure(struct l_genl_msg *msg,
|
||||
struct netdev *netdev)
|
||||
{
|
||||
uint8_t idx;
|
||||
uint32_t type;
|
||||
|
||||
if (nl80211_parse_attrs(msg, NL80211_ATTR_KEY_IDX, &idx,
|
||||
NL80211_ATTR_KEY_TYPE, &type,
|
||||
NL80211_ATTR_UNSPEC) < 0)
|
||||
return;
|
||||
|
||||
l_debug("ifindex=%u key_idx=%u type=%u", netdev->index, idx, type);
|
||||
}
|
||||
|
||||
static void netdev_mlme_notify(struct l_genl_msg *msg, void *user_data)
|
||||
{
|
||||
struct netdev *netdev = NULL;
|
||||
@ -5224,6 +5238,9 @@ static void netdev_mlme_notify(struct l_genl_msg *msg, void *user_data)
|
||||
case NL80211_CMD_DEL_STATION:
|
||||
netdev_station_event(msg, netdev, false);
|
||||
break;
|
||||
case NL80211_CMD_MICHAEL_MIC_FAILURE:
|
||||
netdev_michael_mic_failure(msg, netdev);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user