On 2/14/2023 8:03 PM, Johannes Berg wrote:
On Mon, 2022-11-14 at 15:04 -0800, Aloka Dixit wrote:
if (params->mbssid_ies) {
mbssid = params->mbssid_ies;
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
- size += ieee80211_get_mbssid_beacon_len(mbssid, mbssid->cnt);
+ if (params->rnr_ies) {
+ rnr = params->rnr_ies;
+ size += struct_size(new->rnr_ies, elem, rnr->cnt);
+ }
Is this right? The struct_size() is only the size of the struct, but you
need the size of the elements contained in it here, i.e. the sum of the
.len fields?
johannes
Yes, I modified ieee80211_get_mbssid_beacon_len() to include the 'len'
fields if rnr_ies is present. It is called right after the lines you
have copied here with the new input parameter.