]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix Multiple BSSID element length calculation
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Tue, 14 Nov 2023 04:57:59 +0000 (10:27 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 21 Dec 2023 10:50:27 +0000 (12:50 +0200)
commitc8dd70cfb19e67264a9e9c2f539e3ff27439d12a
treee2ae4d8a874bca0499f08c1c12e16aa5b3effffb
parent618df655ae91a96d467185e81a12e0dbd9ab0c50
Fix Multiple BSSID element length calculation

Currently while deciding to create a new Multiple BSSID element based on
the condition when the length reaches 255, the length value being used
is the total element length (including the length of the Element ID and
Length fields as well). However, the value in the length field denotes
the number of octets following it and excluding itself. Hence including
the total length is wrong. This leads to incorrect count of Multiple
BSSID elements.

And while filling the data, the length is considered porperly as it
should be hence we are filling more data in a single go and all data is
filled in MBSSID count which is less than originally calculated. This
ultimately leads to incorrect length calculation during nla_put() and
setting the beacon to the driver fails while putting the Multiple BSSID
element data into the netlink socket buffer.

Fix this issue by considering the length excluding the Element ID and
Length field sizes.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/ap/ieee802_11.c