commit 7429b2162df1a8d5da40bdff7d955bfaa215a7e7
parent a04b61ec777b3583f387ae42f9c01ec0ab21e432
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 28 Jan 2021 10:33:52 -0800
ap: allow no group traffic on GET_KEY error
Some fullmac cards were found to be buggy with getting the GTK
where it returns a BIP key for the GTK index, even after creating
a GTK with NEW_KEY explicitly. In an effort to get these cards
semi-working we can treat this just as a warning and continue with
the handshake without a GTK set which disables group traffic. A
warning is printed in this case so the user is not completely in
the dark.
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/ap.c b/src/ap.c
@@ -790,10 +790,18 @@ static void ap_gtk_query_cb(struct l_genl_msg *msg, void *user_data)
sta->gtk_query_cmd_id = 0;
- gtk_rsc = nl80211_parse_get_key_seq(msg);
- if (!gtk_rsc)
+ if (l_genl_msg_get_error(msg) < 0)
goto error;
+ gtk_rsc = nl80211_parse_get_key_seq(msg);
+ if (!gtk_rsc) {
+ /* Try allowing connection with no group traffic */
+ l_warn("Failed to get GTK. This may be a driver/FW issue, "
+ "disabling group traffic");
+ ap_start_rsna(sta, NULL);
+ return;
+ }
+
ap_start_rsna(sta, gtk_rsc);
return;