From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH 1/9] dpp: use frame data directly in unwrap for config response
Date: Mon, 20 Dec 2021 13:49:07 -0800 [thread overview]
Message-ID: <20211220214915.34093-1-prestwoj@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
Rather than hard coding ad0, use the actual frame data. There really
isn't a reason this would differ (only status attribute) but just
in case its better to use the frame data directly.
---
src/dpp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/dpp.c b/src/dpp.c
index 5e125265..69dbeb1e 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -391,7 +391,6 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
size_t wrapped_len = 0;
_auto_(l_free) uint8_t *unwrapped = NULL;
struct dpp_configuration *config;
- uint8_t ad0[] = { 0x00, 0x10, 0x01, 0x00, 0x05 };
if (dpp->state != DPP_STATE_CONFIGURING)
return;
@@ -474,7 +473,7 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
return;
}
- unwrapped = dpp_unwrap_attr(ad0, sizeof(ad0), NULL, 0, dpp->ke,
+ unwrapped = dpp_unwrap_attr(ptr, wrapped - ptr - 4, NULL, 0, dpp->ke,
dpp->key_len, wrapped, wrapped_len,
&wrapped_len);
if (!unwrapped) {
--
2.31.1
next reply other threads:[~2021-12-20 21:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 21:49 James Prestwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-20 23:15 [PATCH 1/9] dpp: use frame data directly in unwrap for config response Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211220214915.34093-1-prestwoj@gmail.com \
--to=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox