[openwrt/openwrt] hostapd: add association frame to taxonomy data
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 26 09:47:21 PST 2026
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/79cd45ddeeb5bd711892514658938632890aff17
commit 79cd45ddeeb5bd711892514658938632890aff17
Author: John Crispin <john at phrozen.org>
AuthorDate: Tue Jul 29 14:20:19 2025 +0200
hostapd: add association frame to taxonomy data
Extend the taxonomy subsystem to capture the complete association frame
in addition to the existing probe and association IE data.
This adds a new assoc_frame_taxonomy field to struct sta_info and exposes
it via the get_sta_ies ubus method as a base64-encoded "assoc_frame" field.
Signed-off-by: John Crispin <john at phrozen.org>
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
.../hostapd/patches/600-ubus_support.patch | 52 ++++++++++++++++++++--
...Implement-APuP-Access-Point-Micro-Peering.patch | 2 +-
.../patches/803-hostapd-fix-80211be-build.patch | 2 +-
package/network/services/hostapd/src/src/ap/ubus.c | 3 +-
4 files changed, 52 insertions(+), 7 deletions(-)
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index 0c132b9d27..25f0a504b2 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -251,7 +251,15 @@ probe/assoc/auth requests via object subscribe.
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
* is used */
-@@ -6073,6 +6090,13 @@ static void handle_assoc(struct hostapd_
+@@ -6057,6 +6074,7 @@ static void handle_assoc(struct hostapd_
+
+ #ifdef CONFIG_TAXONOMY
+ taxonomy_sta_info_assoc_req(hapd, sta, pos, left);
++ taxonomy_sta_info_assoc_frame(hapd, sta, mgmt, len);
+ #endif /* CONFIG_TAXONOMY */
+
+ sta->pending_wds_enable = 0;
+@@ -6073,6 +6091,13 @@ static void handle_assoc(struct hostapd_
if (set_beacon)
ieee802_11_update_beacons(hapd->iface);
@@ -265,7 +273,7 @@ probe/assoc/auth requests via object subscribe.
fail:
/*
-@@ -6302,6 +6326,7 @@ static void handle_disassoc(struct hosta
+@@ -6302,6 +6327,7 @@ static void handle_disassoc(struct hosta
(unsigned long) len);
return;
}
@@ -273,7 +281,7 @@ probe/assoc/auth requests via object subscribe.
sta = ap_get_sta(hapd, mgmt->sa);
if (!sta) {
-@@ -6333,6 +6358,8 @@ static void handle_deauth(struct hostapd
+@@ -6333,6 +6359,8 @@ static void handle_deauth(struct hostapd
/* Clear the PTKSA cache entries for PASN */
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
@@ -392,7 +400,15 @@ probe/assoc/auth requests via object subscribe.
hapd->msg_ctx_parent != hapd->msg_ctx)
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
-@@ -302,6 +302,7 @@ struct sta_info {
+@@ -255,6 +255,7 @@ struct sta_info {
+ #ifdef CONFIG_TAXONOMY
+ struct wpabuf *probe_ie_taxonomy;
+ struct wpabuf *assoc_ie_taxonomy;
++ struct wpabuf *assoc_frame_taxonomy;
+ #endif /* CONFIG_TAXONOMY */
+
+ #ifdef CONFIG_FILS
+@@ -302,6 +303,7 @@ struct sta_info {
#endif /* CONFIG_TESTING_OPTIONS */
#ifdef CONFIG_AIRTIME_POLICY
unsigned int airtime_weight;
@@ -657,3 +673,31 @@ probe/assoc/auth requests via object subscribe.
case 'o':
params.override_driver = optarg;
break;
+--- a/src/ap/taxonomy.c
++++ b/src/ap/taxonomy.c
+@@ -290,3 +290,12 @@ void taxonomy_sta_info_assoc_req(const s
+ wpabuf_free(sta->assoc_ie_taxonomy);
+ sta->assoc_ie_taxonomy = wpabuf_alloc_copy(ie, ie_len);
+ }
++
++void taxonomy_sta_info_assoc_frame(const struct hostapd_data *hapd,
++ struct sta_info *sta,
++ const struct ieee80211_mgmt *mgmt,
++ size_t len)
++{
++ wpabuf_free(sta->assoc_frame_taxonomy);
++ sta->assoc_frame_taxonomy = wpabuf_alloc_copy(mgmt, len);
++}
+--- a/src/ap/taxonomy.h
++++ b/src/ap/taxonomy.h
+@@ -18,6 +18,10 @@ void taxonomy_hostapd_sta_info_probe_req
+ void taxonomy_sta_info_assoc_req(const struct hostapd_data *hapd,
+ struct sta_info *sta,
+ const u8 *ie, size_t ie_len);
++void taxonomy_sta_info_assoc_frame(const struct hostapd_data *hapd,
++ struct sta_info *sta,
++ const struct ieee80211_mgmt *mgmt,
++ size_t len);
+ int retrieve_sta_taxonomy(const struct hostapd_data *hapd,
+ struct sta_info *sta, char *buf, size_t buflen);
+
diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
index 514ffaf509..d0c2e67ccf 100644
--- a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
+++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
@@ -393,7 +393,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
if (resp != WLAN_STATUS_SUCCESS)
return resp;
-@@ -6422,6 +6425,11 @@ static void handle_beacon(struct hostapd
+@@ -6423,6 +6426,11 @@ static void handle_beacon(struct hostapd
0);
ap_list_process_beacon(hapd->iface, mgmt, &elems, fi);
diff --git a/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch b/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
index 78034fbb80..2a4ec0b755 100644
--- a/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
+++ b/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
@@ -25,7 +25,7 @@
+
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
-@@ -412,23 +412,8 @@ int ap_sta_re_add(struct hostapd_data *h
+@@ -413,23 +413,8 @@ int ap_sta_re_add(struct hostapd_data *h
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 5e562b62c9..ff0ea312df 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -1623,12 +1623,13 @@ hostapd_bss_get_sta_ies(struct ubus_context *ctx, struct ubus_object *obj,
return UBUS_STATUS_INVALID_ARGUMENT;
sta = ap_get_sta(hapd, addr);
- if (!sta || (!sta->probe_ie_taxonomy && !sta->assoc_ie_taxonomy))
+ if (!sta || (!sta->probe_ie_taxonomy && !sta->assoc_ie_taxonomy && !sta->assoc_frame_taxonomy))
return UBUS_STATUS_NOT_FOUND;
blob_buf_init(&b, 0);
hostapd_add_b64_data("probe_ie", sta->probe_ie_taxonomy);
hostapd_add_b64_data("assoc_ie", sta->assoc_ie_taxonomy);
+ hostapd_add_b64_data("assoc_frame", sta->assoc_frame_taxonomy);
ubus_send_reply(ctx, req, b.head);
return 0;
More information about the lede-commits
mailing list