mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
hostapd: WISPr bandwidth for psk2-radius
Get bandwidth limits from WISPr RADIUS AVPs for RADIUS ACL. Signed-off-by: Arif Alam <arif.alam@netexperience.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
--- a/src/ap/ieee802_11_auth.c
|
||||||
|
+++ b/src/ap/ieee802_11_auth.c
|
||||||
|
@@ -578,6 +578,8 @@ hostapd_acl_recv_radius(struct radius_ms
|
||||||
|
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;
|
||||||
|
--- 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,
|
||||||
|
--- a/src/ap/ieee802_11.c
|
||||||
|
+++ b/src/ap/ieee802_11.c
|
||||||
|
@@ -2406,6 +2406,8 @@ int ieee802_11_set_radius_info(struct ho
|
||||||
|
ap_sta_no_session_timeout(hapd, sta);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ os_memcpy(sta->bandwidth, info->bandwidth, sizeof(sta->bandwidth));
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user