mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
dpp: use frame data directly in unwrap for config response
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.
This commit is contained in:
parent
d2240c4a62
commit
c42080fe28
@ -391,7 +391,6 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
|
|||||||
size_t wrapped_len = 0;
|
size_t wrapped_len = 0;
|
||||||
_auto_(l_free) uint8_t *unwrapped = NULL;
|
_auto_(l_free) uint8_t *unwrapped = NULL;
|
||||||
struct dpp_configuration *config;
|
struct dpp_configuration *config;
|
||||||
uint8_t ad0[] = { 0x00, 0x10, 0x01, 0x00, 0x05 };
|
|
||||||
|
|
||||||
if (dpp->state != DPP_STATE_CONFIGURING)
|
if (dpp->state != DPP_STATE_CONFIGURING)
|
||||||
return;
|
return;
|
||||||
@ -474,7 +473,7 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
|
|||||||
return;
|
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,
|
dpp->key_len, wrapped, wrapped_len,
|
||||||
&wrapped_len);
|
&wrapped_len);
|
||||||
if (!unwrapped) {
|
if (!unwrapped) {
|
||||||
|
Loading…
Reference in New Issue
Block a user