aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/wps/wps_registrar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 154c2b4..44bb006 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -361,8 +361,13 @@ static void wps_registrar_remove_pbc_session(struct wps_registrar *reg,
pbc = reg->pbc_sessions;
while (pbc) {
if (os_memcmp(pbc->uuid_e, uuid_e, WPS_UUID_LEN) == 0 ||
+#ifdef ANDROID_P2P
+ (p2p_dev_addr && !is_zero_ether_addr(pbc->addr) &&
+ os_memcmp(pbc->addr, p2p_dev_addr, ETH_ALEN) ==
+#else
(p2p_dev_addr && !is_zero_ether_addr(reg->p2p_dev_addr) &&
os_memcmp(reg->p2p_dev_addr, p2p_dev_addr, ETH_ALEN) ==
+#endif
0)) {
if (prev)
prev->next = pbc->next;