wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/x-0005-add-vlan_id-to-sta-authorized-event.patch
Paul White 832fbb8898 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>
2024-02-06 10:25:02 +01:00

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");