* [PATCH 1/9] dpp: use frame data directly in unwrap for config response
@ 2021-12-20 21:49 James Prestwood
0 siblings, 0 replies; 2+ messages in thread
From: James Prestwood @ 2021-12-20 21:49 UTC (permalink / raw)
To: iwd
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/9] dpp: use frame data directly in unwrap for config response
@ 2021-12-20 23:15 Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-12-20 23:15 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Hi James,
On 12/20/21 15:49, James Prestwood wrote:
> 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(-)
>
Patches 1-3 applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-20 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-20 23:15 [PATCH 1/9] dpp: use frame data directly in unwrap for config response Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2021-12-20 21:49 James Prestwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox