eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit ce94013baef7257cee50334aa0ddd327640b44c9
parent 6f7743426b4182cfd55ba3e1bde9a7d53cc310d5
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Wed, 30 Mar 2022 19:33:57 +0200

p2p: Fix Device Address updates from Probe Requests

p2p_peer_update_existing may be called with a scan_bss struct built from
a Probe Request frame so it can't access bss->p2p_probe_resp_info even
if peer->bss was built from a Probe Response.  Check the source frame
type of the scan_bss struct before updating the Device Address.

This fixes one timing issue that would make the autotest fail often.

Diffstat:
Msrc/p2p.c | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/p2p.c b/src/p2p.c @@ -3655,11 +3655,15 @@ static bool p2p_peer_update_existing(struct scan_bss *bss, * Some property changes may need to be notified here. */ - if (peer->device_addr == peer->bss->addr) - peer->device_addr = bss->addr; - else + if (bss->source_frame == SCAN_BSS_PROBE_RESP) peer->device_addr = bss->p2p_probe_resp_info->device_info.device_addr; + else if (bss->source_frame == SCAN_BSS_PROBE_REQ && !l_memeqzero( + bss->p2p_probe_req_info->device_info.device_addr, 6)) + peer->device_addr = + bss->p2p_probe_req_info->device_info.device_addr; + else + peer->device_addr = bss->addr; scan_bss_free(peer->bss); peer->bss = bss;