public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 4/5] nl80211util: support attributes in CMD_EXTERNAL_AUTH
Date: Fri, 23 Aug 2024 11:18:32 -0500	[thread overview]
Message-ID: <20240823161848.485685-4-denkenz@gmail.com> (raw)
In-Reply-To: <20240823161848.485685-1-denkenz@gmail.com>

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


  parent reply	other threads:[~2024-08-23 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23 16:18 [PATCH 1/5] defs: Add defs.h to hold certain global definitions Denis Kenzior
2024-08-23 16:18 ` [PATCH 2/5] monitor: Don't dump survey results with noscan Denis Kenzior
2024-08-23 16:18 ` [PATCH 3/5] monitor: Don't skip genl control Done,Error messages Denis Kenzior
2024-08-23 16:18 ` Denis Kenzior [this message]
2024-08-23 16:18 ` [PATCH 5/5] nl80211util: Add builder for CMD_EXTERNAL_AUTH Denis Kenzior
2024-08-23 17:21 ` [PATCH 1/5] defs: Add defs.h to hold certain global definitions James Prestwood
2024-08-23 17:24 ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240823161848.485685-4-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox