mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
netdev: simplify
This commit is contained in:
parent
480332226d
commit
1c5438d3ab
28
src/netdev.c
28
src/netdev.c
@ -370,29 +370,27 @@ static void netdev_rekey_offload_event(struct l_genl_msg *msg,
|
||||
return;
|
||||
|
||||
while (l_genl_attr_next(&attr, &type, &len, &data)) {
|
||||
switch (type) {
|
||||
case NL80211_ATTR_REKEY_DATA:
|
||||
if (type != NL80211_ATTR_REKEY_DATA)
|
||||
continue;
|
||||
|
||||
if (!l_genl_attr_recurse(&attr, &nested))
|
||||
return;
|
||||
|
||||
while (l_genl_attr_next(&nested, &type, &len, &data)) {
|
||||
switch (type) {
|
||||
case NL80211_REKEY_DATA_REPLAY_CTR:
|
||||
if (len != sizeof(uint64_t))
|
||||
if (type != NL80211_REKEY_DATA_REPLAY_CTR)
|
||||
continue;
|
||||
|
||||
if (len != sizeof(uint64_t)) {
|
||||
l_warn("Invalid replay_ctr");
|
||||
else {
|
||||
replay_ctr = *((uint64_t *)
|
||||
data);
|
||||
__eapol_update_replay_counter(
|
||||
netdev->index,
|
||||
return;
|
||||
}
|
||||
|
||||
replay_ctr = *((uint64_t *) data);
|
||||
__eapol_update_replay_counter(netdev->index,
|
||||
netdev->addr,
|
||||
netdev->remote_addr,
|
||||
replay_ctr);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user