mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
ap: handle -ENOTSUP when getting the GTK
Some hardware does not support this, so use a zero RSC in this case rather than failing the association.
This commit is contained in:
parent
fb8ef45213
commit
62301b7918
7
src/ap.c
7
src/ap.c
@ -1499,14 +1499,19 @@ static void ap_gtk_query_cb(struct l_genl_msg *msg, void *user_data)
|
|||||||
struct sta_state *sta = user_data;
|
struct sta_state *sta = user_data;
|
||||||
const void *gtk_rsc;
|
const void *gtk_rsc;
|
||||||
uint8_t zero_gtk_rsc[6];
|
uint8_t zero_gtk_rsc[6];
|
||||||
|
int err;
|
||||||
|
|
||||||
sta->gtk_query_cmd_id = 0;
|
sta->gtk_query_cmd_id = 0;
|
||||||
|
|
||||||
if (l_genl_msg_get_error(msg) < 0)
|
err = l_genl_msg_get_error(msg);
|
||||||
|
if (err == -ENOTSUP)
|
||||||
|
goto zero_rsc;
|
||||||
|
else if (err < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
gtk_rsc = nl80211_parse_get_key_seq(msg);
|
gtk_rsc = nl80211_parse_get_key_seq(msg);
|
||||||
if (!gtk_rsc) {
|
if (!gtk_rsc) {
|
||||||
|
zero_rsc:
|
||||||
memset(zero_gtk_rsc, 0, 6);
|
memset(zero_gtk_rsc, 0, 6);
|
||||||
gtk_rsc = zero_gtk_rsc;
|
gtk_rsc = zero_gtk_rsc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user