]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MBSSID: Fix Non-Inheritance element length calculation
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Tue, 11 Feb 2025 11:06:01 +0000 (16:36 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 11 Feb 2025 15:52:06 +0000 (17:52 +0200)
Commit 4bfc007b61e6 ("MBSSID: Fix Non-Inheritance element encoding")
added one octet while filling the data. However, this one octet is
missing during length calculation. Add it now.

Fixes: 4bfc007b61e6 ("MBSSID: Fix Non-Inheritance element encoding")
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/ap/ieee802_11.c

index ec1437c1ebb6451805b8f6885ff4b018891752e2..61dbfe43f1c17a03e82e813c16b47c7f96c86b6c 100644 (file)
@@ -8322,7 +8322,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
                else if (hapd->conf->xrates_supported)
                        ie_count++;
                if (ie_count)
-                       nontx_profile_len += 4 + ie_count;
+                       nontx_profile_len += 4 + ie_count + 1;
 
                if (len + nontx_profile_len > 255)
                        break;