mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
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:
@@ -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");
|
||||||
|
|
||||||
Reference in New Issue
Block a user