hostapd: include vlan_id in sta-authorized event

There are use cases where it's helpful to know the vlan_id assigned to a
client (dynamic VLAN) when consuming the sta-authorized ubus event

Signed-off-by: Paul White <paul@shasta.cloud>
This commit is contained in:
Paul White
2024-01-25 04:37:08 +00:00
committed by John Crispin
parent 4d2603b4ce
commit 832fbb8898

View File

@@ -0,0 +1,11 @@
--- a/src/ap/ubus.c
+++ b/src/ap/ubus.c
@@ -1914,6 +1914,8 @@ void hostapd_ubus_notify_authorized(stru
blob_buf_init(&b, 0);
blobmsg_add_macaddr(&b, "address", sta->addr);
blobmsg_add_string(&b, "ifname", hapd->conf->iface);
+ if (sta->vlan_id)
+ blobmsg_add_u32(&b, "vlan_id", sta->vlan_id);
if (sta->bandwidth[0] || sta->bandwidth[1]) {
void *r = blobmsg_open_array(&b, "rate-limit");