[PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH

Denis Kenzior
2024-08-23T16:18:53Z

---
src/nl80211util.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

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:
--
2.45.2