mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-25 17:27:06 +00:00
Compare commits
2 Commits
v4.2.0
...
staging-WI
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c3d876b1d | ||
|
|
d5374d4e14 |
@@ -0,0 +1,69 @@
|
||||
From c2e1dbd799ae5ed166e9c84a3c3d3a07a8f8cc9b Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Thu, 11 Dec 2025 10:38:07 +0530
|
||||
Subject: [PATCH] bandwidth: Correct handling of RADIUS-assigned bandwidth
|
||||
limits
|
||||
|
||||
Description:
|
||||
Hostapd successfully parsed the uplink and downlink bandwidth attributes from
|
||||
the RADIUS server, but the values were not being propagated correctly into
|
||||
sta_info. As a result, the bandwidth information was missing in the UBUS
|
||||
events sent to ucentral-event.
|
||||
|
||||
Fix:
|
||||
Ensure the parsed bandwidth values are correctly passed to sta_info so they
|
||||
are included in subsequent UBUS notifications.
|
||||
|
||||
Tests Performed:
|
||||
Configured per-client bandwidth limits on the RADIUS server and verified that:
|
||||
|
||||
- The AP enforces the configured uplink/downlink limits, and
|
||||
- The correct bandwidth values appear in the UBUS events.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
src/ap/ieee802_11.c | 2 ++
|
||||
src/ap/ieee802_11_auth.c | 1 +
|
||||
src/ap/ieee802_11_auth.h | 1 +
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
|
||||
index ef1ad21..615fb32 100644
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -2485,6 +2485,8 @@ int ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
ap_sta_no_session_timeout(hapd, sta);
|
||||
}
|
||||
|
||||
+ os_memcpy(sta->bandwidth, info->bandwidth, sizeof(sta->bandwidth));
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c
|
||||
index e673296..9d0d734 100644
|
||||
--- a/src/ap/ieee802_11_auth.c
|
||||
+++ b/src/ap/ieee802_11_auth.c
|
||||
@@ -581,6 +581,7 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req,
|
||||
os_memcpy(info->radius_cui, buf, len);
|
||||
}
|
||||
|
||||
+ radius_msg_get_wispr(msg, info->bandwidth);
|
||||
if (hapd->conf->wpa_psk_radius == PSK_RADIUS_REQUIRED &&
|
||||
!info->psk)
|
||||
cache->accepted = HOSTAPD_ACL_REJECT;
|
||||
diff --git a/src/ap/ieee802_11_auth.h b/src/ap/ieee802_11_auth.h
|
||||
index 22ae1a9..b0005bd 100644
|
||||
--- a/src/ap/ieee802_11_auth.h
|
||||
+++ b/src/ap/ieee802_11_auth.h
|
||||
@@ -23,6 +23,7 @@ struct radius_sta {
|
||||
struct hostapd_sta_wpa_psk_short *psk;
|
||||
char *identity;
|
||||
char *radius_cui;
|
||||
+ u32 bandwidth[2];
|
||||
};
|
||||
|
||||
int hostapd_check_acl(struct hostapd_data *hapd, const u8 *addr,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -37,7 +37,19 @@ function qdisc_del(iface) {
|
||||
}
|
||||
|
||||
function ifb_dev(iface) {
|
||||
return "i-" + iface;
|
||||
let ifbname;
|
||||
|
||||
if ((index(iface, 'phy') != -1) && (index(iface, 'ap') != -1)) {
|
||||
// For interfaces like phy6g-ap0, phy5g-ap0, phy2g-ap0
|
||||
// we replace 'phy' with "p" to confine the ifb name length
|
||||
// and replace 'ap' with 'a' to further shorten it.
|
||||
ifbname = replace(iface, 'phy', 'p');
|
||||
ifbname = replace(ifbname, 'ap', 'a');
|
||||
} else {
|
||||
ifbname = iface;
|
||||
}
|
||||
ifbname = "i-" + ifbname;
|
||||
return ifbname;
|
||||
}
|
||||
|
||||
function ifb_add(iface, ifbdev) {
|
||||
|
||||
Reference in New Issue
Block a user