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;
|
return;
|
||||||
|
|
||||||
while (l_genl_attr_next(&attr, &type, &len, &data)) {
|
while (l_genl_attr_next(&attr, &type, &len, &data)) {
|
||||||
switch (type) {
|
if (type != NL80211_ATTR_REKEY_DATA)
|
||||||
case NL80211_ATTR_REKEY_DATA:
|
continue;
|
||||||
|
|
||||||
if (!l_genl_attr_recurse(&attr, &nested))
|
if (!l_genl_attr_recurse(&attr, &nested))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (l_genl_attr_next(&nested, &type, &len, &data)) {
|
while (l_genl_attr_next(&nested, &type, &len, &data)) {
|
||||||
switch (type) {
|
if (type != NL80211_REKEY_DATA_REPLAY_CTR)
|
||||||
case NL80211_REKEY_DATA_REPLAY_CTR:
|
continue;
|
||||||
if (len != sizeof(uint64_t))
|
|
||||||
|
if (len != sizeof(uint64_t)) {
|
||||||
l_warn("Invalid replay_ctr");
|
l_warn("Invalid replay_ctr");
|
||||||
else {
|
return;
|
||||||
replay_ctr = *((uint64_t *)
|
}
|
||||||
data);
|
|
||||||
__eapol_update_replay_counter(
|
replay_ctr = *((uint64_t *) data);
|
||||||
netdev->index,
|
__eapol_update_replay_counter(netdev->index,
|
||||||
netdev->addr,
|
netdev->addr,
|
||||||
netdev->remote_addr,
|
netdev->remote_addr,
|
||||||
replay_ctr);
|
replay_ctr);
|
||||||
}
|
return;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue