diff mbox series

ap: correct extra IEs length calculation for WMM IE

Message ID 20230127172930.2686333-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series ap: correct extra IEs length calculation for WMM IE | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Jan. 27, 2023, 5:29 p.m. UTC
The extra IE length for the WMM IE was being set to 26 which is
the HT IE length, not WMM. Fix this and use the proper size for
the WMM IE of 50 bytes.

This shouldn't have caused any problems prior as the tail length
is always allocated with 256 or 512 extra bytes of headroom.
---
 src/ap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Denis Kenzior Jan. 27, 2023, 6:22 p.m. UTC | #1
Hi James,

On 1/27/23 11:29, James Prestwood wrote:
> The extra IE length for the WMM IE was being set to 26 which is
> the HT IE length, not WMM. Fix this and use the proper size for
> the WMM IE of 50 bytes.
> 
> This shouldn't have caused any problems prior as the tail length
> is always allocated with 256 or 512 extra bytes of headroom.
> ---
>   src/ap.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/ap.c b/src/ap.c
index 10cc0f00..b51befe4 100644
--- a/src/ap.c
+++ b/src/ap.c
@@ -939,8 +939,9 @@  static size_t ap_get_extra_ies_len(struct ap_state *ap,
 
 	len += ap_get_wsc_ie_len(ap, type, client_frame, client_frame_len);
 
+	/* WMM IE length */
 	if (ap->supports_ht)
-		len += 26;
+		len += 50;
 
 	if (ap->ops->get_extra_ies_len)
 		len += ap->ops->get_extra_ies_len(type, client_frame,