From patchwork Thu May 24 08:37:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: P2P When UUID gets changed and more pbc session entries are created, remove logic should check for loop entry address Date: Wed, 23 May 2012 22:37:27 -0000 From: Neeraj Garg X-Patchwork-Id: 161076 Message-Id: To: "hostap@lists.shmoo.com" When UUID gets changed between a received probe request (for wps) and the M1 message, we might endup creating 2 entries in pbc sessions list (with same device address and different UUID). But when we try to remove the entries, we need to compare that pbc sessions list entry->address. This will ensure that both entries gets removed. Please let me know if the below patch is OK or I am missing something in my understanding. >From 1785eabf9c28bcd3012cc18bc510711f7f8febb9 Mon Sep 17 00:00:00 2001 From: Neeraj Garg Date: Thu, 24 May 2012 14:01:40 +0530 Subject: [PATCH] Patch:P2P When UUID gets changed and more pbc session entries are created, remove logic should check for loop entry address Signed-off-by: Neeraj Garg --- src/wps/wps_registrar.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/wps/wps_registrar.c diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c old mode 100644 new mode 100755 index e6ec04c..678375b --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -313,8 +313,8 @@ 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 || - (p2p_dev_addr && !is_zero_ether_addr(reg->p2p_dev_addr) && - os_memcmp(reg->p2p_dev_addr, p2p_dev_addr, ETH_ALEN) == + (p2p_dev_addr && !is_zero_ether_addr(pbc->addr) && + os_memcmp(pbc->addr, p2p_dev_addr, ETH_ALEN) == 0)) { if (prev) prev->next = pbc->next;