mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 02:43:38 +00:00
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>
12 lines
401 B
Diff
12 lines
401 B
Diff
--- 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");
|
|
|