mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
From 008ecaede12be6a6929bad28a170a99aae42ba04 Mon Sep 17 00:00:00 2001
|
|
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
Date: Thu, 17 Aug 2023 10:54:36 +0530
|
|
Subject: [PATCH] hostapd: fix MBSSID IE len calculation
|
|
|
|
Currently while deciding to create a new MBSSID IE based on the condition
|
|
when length reaches 255, the length value being used is the total IE length
|
|
(including length of Element ID and Length field as well). However, the value
|
|
in the length field denotes the bytes following it and excluding it and hence
|
|
including the total length is wrong. This leads to incorrect MBSSID IE count.
|
|
|
|
And while filling the data, the length is considered porperly as it should be
|
|
hence we are filling more data in single go and all data is filled in MBSSID
|
|
count which was less than originally calculated. This ultimately leads to
|
|
incorrect access of data while putting this into NL socket buffer and setting
|
|
beacon fails.
|
|
|
|
Fix this issue by considering the length excluding the Element ID and Length
|
|
sizes.
|
|
|
|
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
---
|
|
src/ap/ieee802_11.c | 14 +++++++++++++-
|
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
|
|
--- a/src/ap/ieee802_11.c
|
|
+++ b/src/ap/ieee802_11.c
|
|
@@ -7774,7 +7774,17 @@ static size_t hostapd_eid_mbssid_elem_le
|
|
size_t known_bss_len)
|
|
{
|
|
struct hostapd_data *tx_bss = hostapd_mbssid_get_tx_bss(hapd);
|
|
- size_t len = 3, i, tx_xrate_len;
|
|
+ size_t len, i, tx_xrate_len;
|
|
+
|
|
+ /* Element ID: 1 octet
|
|
+ * Length: 1 octet
|
|
+ * Max BSSID Indicator: 1 octet
|
|
+ *
|
|
+ * New MBSSID IE will be required when value in len reaches 255. Hence,
|
|
+ * for now len will have 1 byte for Max BSSID Indicator. Before returing
|
|
+ * len, we will add the 2 bytes for Element ID and Length.
|
|
+ */
|
|
+ len = 1;
|
|
|
|
hostapd_eid_ext_supp_rates(tx_bss, NULL, &tx_xrate_len);
|
|
for (i = *bss_index; i < hapd->iface->num_bss; i++) {
|
|
@@ -7834,6 +7844,8 @@ static size_t hostapd_eid_mbssid_elem_le
|
|
}
|
|
|
|
*bss_index = i;
|
|
+ len += 2;
|
|
+
|
|
return len;
|
|
}
|
|
|