mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2026-03-20 03:39:54 +00:00
Compare commits
1 Commits
next
...
staging-WI
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21c7fa69ab |
@@ -0,0 +1,105 @@
|
||||
From aa6d2c350494a2ec459b4ada9448d34db4162570 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Wed, 11 Feb 2026 19:45:02 +0530
|
||||
Subject: [PATCH] hostapd / 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>
|
||||
---
|
||||
...t-handling-of-RADIUS-assigned-bandwi.patch | 68 +++++++++++++++++++
|
||||
1 file changed, 68 insertions(+)
|
||||
create mode 100644 package/network/services/hostapd/patches/zzzz-007-bandwidth-Correct-handling-of-RADIUS-assigned-bandwi.patch
|
||||
|
||||
diff --git a/package/network/services/hostapd/patches/zzzz-007-bandwidth-Correct-handling-of-RADIUS-assigned-bandwi.patch b/package/network/services/hostapd/patches/zzzz-007-bandwidth-Correct-handling-of-RADIUS-assigned-bandwi.patch
|
||||
new file mode 100644
|
||||
index 0000000000..ed1f939832
|
||||
--- /dev/null
|
||||
+++ b/package/network/services/hostapd/patches/zzzz-007-bandwidth-Correct-handling-of-RADIUS-assigned-bandwi.patch
|
||||
@@ -0,0 +1,68 @@
|
||||
+From af32759b9e2869ac036c598e3e98c5801455b392 Mon Sep 17 00:00:00 2001
|
||||
+From: Venkat Chimata <venkat@nearhop.com>
|
||||
+Date: Wed, 11 Feb 2026 11:47:05 +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 | 1 +
|
||||
+ src/ap/ieee802_11_auth.c | 1 +
|
||||
+ src/ap/ieee802_11_auth.h | 1 +
|
||||
+ 3 files changed, 3 insertions(+)
|
||||
+
|
||||
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
|
||||
+index d3cce33..6f491e1 100644
|
||||
+--- a/src/ap/ieee802_11.c
|
||||
++++ b/src/ap/ieee802_11.c
|
||||
+@@ -2385,6 +2385,7 @@ 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 4277d82..57132b7 100644
|
||||
+--- a/src/ap/ieee802_11_auth.c
|
||||
++++ b/src/ap/ieee802_11_auth.c
|
||||
+@@ -572,6 +572,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
|
||||
+
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user