diff mbox series

[4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH

Message ID 20240823161848.485685-4-denkenz@gmail.com (mailing list archive)
State New
Headers show
Series [1/5] defs: Add defs.h to hold certain global definitions | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

Denis Kenzior Aug. 23, 2024, 4:18 p.m. UTC
---
 src/nl80211util.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/src/nl80211util.c b/src/nl80211util.c
index eaf9f610fc5f..c1218c21fcd2 100644
--- a/src/nl80211util.c
+++ b/src/nl80211util.c
@@ -132,6 +132,14 @@  static bool extract_iovec(const void *data, uint16_t len, void *o)
 	return true;
 }
 
+static bool extract_ssid(const void *data, uint16_t len, void *o)
+{
+	if (!len || len > SSID_MAX_SIZE)
+		return false;
+
+	return extract_iovec(data, len, o);
+}
+
 static bool extract_nested(const void *data, uint16_t len, void *o)
 {
 	const struct l_genl_attr *outer = data;
@@ -170,6 +178,7 @@  static attr_handler handler_for_nl80211(int type)
 	case NL80211_ATTR_REG_ALPHA2:
 		return extract_2_chars;
 	case NL80211_ATTR_MAC:
+	case NL80211_ATTR_BSSID:
 		return extract_mac;
 	case NL80211_ATTR_ACK:
 		return extract_flag;
@@ -179,9 +188,13 @@  static attr_handler handler_for_nl80211(int type)
 	case NL80211_ATTR_CHANNEL_WIDTH:
 	case NL80211_ATTR_CENTER_FREQ1:
 	case NL80211_ATTR_CENTER_FREQ2:
+	case NL80211_ATTR_AKM_SUITES:
+	case NL80211_ATTR_EXTERNAL_AUTH_ACTION:
 		return extract_uint32;
 	case NL80211_ATTR_FRAME:
 		return extract_iovec;
+	case NL80211_ATTR_SSID:
+		return extract_ssid;
 	case NL80211_ATTR_WIPHY_BANDS:
 	case NL80211_ATTR_SURVEY_INFO:
 	case NL80211_ATTR_KEY: