Skip to contentSkip to conversation

netdev: don't include ATTR_IE for SAE

PATCH New James Prestwood 1 participant 1 message May 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdev: don't include ATTR_IE for SAE

The spec outlines what fields/elements can be included with different auth types. For SAE only a few fields are allowed. IE's are not allowed but were being included with CMD_AUTHENTICATE.

---
 src/netdev.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
src/netdev.c +9 -1
index b3c3bf73..bce6ada3 100644
@@ -2143,7 +2143,15 @@ static struct l_genl_msg *netdev_build_cmd_authenticate(struct netdev *netdev,
 	l_genl_msg_append_attr(msg, NL80211_ATTR_SSID, hs->ssid_len, hs->ssid);
 	l_genl_msg_append_attr(msg, NL80211_ATTR_AUTH_TYPE, 4, &auth_type);
 
-	l_genl_msg_append_attr(msg, NL80211_ATTR_IE, hs->supplicant_ie[1] + 2,
+	/*
+	 * IEEE 802.11-2016 Table 9-36 Presents of fields in Auth frames
+	 *
+	 * For the SAE auth type no IEs are listed to be included in the
+	 * authenticate frame. Only SAE related fields should be included.
+	 */
+	if (auth_type != NL80211_AUTHTYPE_SAE)
+		l_genl_msg_append_attr(msg, NL80211_ATTR_IE,
+					hs->supplicant_ie[1] + 2,
 					hs->supplicant_ie);
 
 	return msg;
Signature · 1 line
2.21.1