hostapd: add radius WISPr rate control AVPs
This allows a radius server to send AVPs for client rate control inside the accept message. Further add the ratelimits to the sta-authorized ubus notification. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1876,6 +1876,13 @@ void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *
|
||||
blobmsg_add_string(&b, "ifname", hapd->conf->iface);
|
||||
if (auth_alg)
|
||||
blobmsg_add_string(&b, "auth-alg", auth_alg);
|
||||
if (sta->bandwidth[0] || sta->bandwidth[1]) {
|
||||
void *r = blobmsg_open_array(&b, "rate-limit");
|
||||
|
||||
blobmsg_add_u32(&b, "", sta->bandwidth[0]);
|
||||
blobmsg_add_u32(&b, "", sta->bandwidth[1]);
|
||||
blobmsg_close_array(&b, r);
|
||||
}
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, "sta-authorized", b.head, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user