mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
p2p: Send the right UUID-E in probe request WSC IEs
When building the scan IEs for our provisioning scans, use the UUID-E based on the Interface Address, not the Device Address, as that is what wsc.c will be using to in the registration protocol. Eventually we may have to base the UUID-E on the Device Address or something else that is persistent, and pass the actual UUID-E to wsc.c, as the Interface Address is randomly generated on every connect attempt. IIRC the UUID-E is supposed to be persistent.
This commit is contained in:
parent
7a91f6dba4
commit
19ab25f1d6
10
src/p2p.c
10
src/p2p.c
@ -329,6 +329,7 @@ static uint8_t *p2p_build_scan_ies(struct p2p_device *dev, uint8_t *buf,
|
||||
size_t wsc_ie_size;
|
||||
uint8_t wfd_ie[32];
|
||||
size_t wfd_ie_size;
|
||||
const uint8_t *addr;
|
||||
|
||||
p2p_info.capability = dev->capability;
|
||||
memcpy(p2p_info.listen_channel.country, dev->listen_country, 3);
|
||||
@ -350,7 +351,14 @@ static uint8_t *p2p_build_scan_ies(struct p2p_device *dev, uint8_t *buf,
|
||||
wsc_info.request_type = WSC_REQUEST_TYPE_ENROLLEE_INFO;
|
||||
wsc_info.config_methods = dev->device_info.wsc_config_methods;
|
||||
|
||||
if (!wsc_uuid_from_addr(dev->addr, wsc_info.uuid_e))
|
||||
/*
|
||||
* If we're doing the provisioning scan, we need to use the same UUID-E
|
||||
* that we'll use in the WSC enrollee registration protocol because the
|
||||
* GO might validate it.
|
||||
*/
|
||||
addr = dev->conn_peer ? dev->conn_addr : dev->addr;
|
||||
|
||||
if (!wsc_uuid_from_addr(addr, wsc_info.uuid_e))
|
||||
return NULL;
|
||||
|
||||
wsc_info.primary_device_type = dev->device_info.primary_device_type;
|
||||
|
Loading…
Reference in New Issue
Block a user