commit 7d3092e1ca1f7f2fd93a63d834397c70f4d25963
parent 122ea7a8aaac81dd29b76e3660f44f9ff2edc9ea
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Sat, 11 Jul 2020 03:00:37 +0200
p2p: Update peer->device_addr when updating peer->bss
peer->device_addr is a pointer to the Device Address contained in
one of two possible places in peer->bss. If during discovery we've
received a new beacon/probe response for an existing peer and we're
going to replace peer->bss, we also have to update peer->device_addr.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/p2p.c b/src/p2p.c
@@ -2408,6 +2408,13 @@ static bool p2p_peer_update_existing(struct scan_bss *bss,
* from the discovery scan results.
* Do we need to update DBus properties?
*/
+
+ if (peer->device_addr == peer->bss->addr)
+ peer->device_addr = bss->addr;
+ else
+ peer->device_addr =
+ bss->p2p_probe_resp_info->device_info.device_addr;
+
scan_bss_free(peer->bss);
peer->bss = bss;