[PATCH 02/20] common: Parse Security Profile element

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Jun 10 06:11:55 PDT 2026


From: Ilan Peer <ilan.peer at intel.com>

Add support for parsing security profile element both in
ieee802_11_parse_elems() and in wpa_parse_kde_ies().

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/common/ieee802_11_common.c | 6 ++++++
 src/common/ieee802_11_common.h | 2 ++
 src/common/wpa_common.c        | 5 +++++
 src/common/wpa_common.h        | 2 ++
 4 files changed, 15 insertions(+)

diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index e5b9bb58a6..d8d763b92f 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -460,6 +460,12 @@ static int ieee802_11_parse_extension(const u8 *pos, size_t elen,
 		elems->uhr_operation = pos;
 		elems->uhr_operation_len = elen;
 		break;
+	case WLAN_EID_EXT_SECURITY_PROFILE:
+		if (elen < 3)
+			break;
+		elems->security_profile = pos;
+		elems->security_profile_len = elen;
+		break;
 	default:
 		if (show_errors) {
 			wpa_printf(MSG_MSGDUMP,
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
index 2751c668c9..b675d21e6b 100644
--- a/src/common/ieee802_11_common.h
+++ b/src/common/ieee802_11_common.h
@@ -133,6 +133,7 @@ struct ieee802_11_elems {
 	const u8 *nan_ie;
 	const u8 *uhr_capabilities;
 	const u8 *uhr_operation;
+	const u8 *security_profile;
 
 	u8 ssid_len;
 	u8 supp_rates_len;
@@ -209,6 +210,7 @@ struct ieee802_11_elems {
 	size_t nan_len;
 	u8 uhr_capabilities_len;
 	u8 uhr_operation_len;
+	size_t security_profile_len;
 
 	struct mb_ies_info mb_ies;
 
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index 506a78e1f7..60b06366b8 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -4173,6 +4173,11 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)
 			   pos[2] == WLAN_EID_EXT_EHT_CAPABILITIES) {
 			ie->eht_capabilities = pos + 3;
 			ie->eht_capab_len = pos[1] - 1;
+		} else if (*pos == WLAN_EID_EXTENSION &&
+			   pos[1] >= 3 &&
+			   pos[2] == WLAN_EID_EXT_SECURITY_PROFILE) {
+			ie->security_profile = pos + 3;
+			ie->security_profile_len = pos[1] - 1;
 		} else if (*pos == WLAN_EID_QOS && pos[1] >= 1) {
 			ie->qosinfo = pos[2];
 		} else if (*pos == WLAN_EID_SUPPORTED_CHANNELS) {
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index 268819db46..60cea3ab8c 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -766,6 +766,8 @@ struct wpa_eapol_ie_parse {
 	size_t mlo_link_len[MAX_NUM_MLD_LINKS];
 	const u8 *rsn_override_link[MAX_NUM_MLD_LINKS];
 	size_t rsn_override_link_len[MAX_NUM_MLD_LINKS];
+	const u8 *security_profile;
+	size_t security_profile_len;
 };
 
 int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie);
-- 
2.53.0




More information about the Hostap mailing list