From patchwork Wed Feb 8 13:34:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr.Nakraszewicz@tieto.com X-Patchwork-Id: 140145 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DEEAAB6F99 for ; Thu, 9 Feb 2012 00:34:31 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 49E889C1AE; Wed, 8 Feb 2012 08:34:27 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1IhP+v-DoNiQ; Wed, 8 Feb 2012 08:34:26 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B30ED17C00F; Wed, 8 Feb 2012 08:34:21 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 173939C1AC for ; Wed, 8 Feb 2012 08:34:20 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FZd1CjJZ53Kl for ; Wed, 8 Feb 2012 08:34:14 -0500 (EST) Received: from ebb05.tieto.com (ebb05.tieto.com [131.207.168.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "ebb05.tieto.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 963E19C1AB for ; Wed, 8 Feb 2012 08:34:14 -0500 (EST) X-AuditID: 83cfa824-b7c6fae00000479a-c1-4f3279d2a331 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb05.tieto.com (SMTP Mailer) with SMTP id 90.32.18330.2D9723F4; Wed, 8 Feb 2012 15:34:10 +0200 (EET) Received: from EXMB03.eu.tieto.com ([169.254.1.70]) by FIHGA-EXHUB01.eu.tieto.com ([131.207.136.34]) with mapi; Wed, 8 Feb 2012 15:34:10 +0200 From: To: Date: Wed, 8 Feb 2012 15:34:09 +0200 Subject: [PATCH] P2P: Do not expire GO peer entry during group rekeying Thread-Topic: [PATCH] P2P: Do not expire GO peer entry during group rekeying Thread-Index: AczmZlYyOLwOv1UOSaybUR+DhHB6kA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Brightmail-Tracker: AAAAAgPmCRAZ/bbi X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Hi, If wpas_go_connected() is called during group rekeying the P2P GO peer will expire. To prevent that check if group rekeying is not in progress. --- wpa_supplicant/p2p_supplicant.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index ec4ba4a..b3f4a94 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -2222,7 +2222,8 @@ static int wpas_go_connected(void *ctx, const u8 *dev_addr) continue; if (ssid->mode != WPAS_MODE_INFRA) continue; - if (wpa_s->wpa_state != WPA_COMPLETED) + if (wpa_s->wpa_state != WPA_COMPLETED && + wpa_s->wpa_state != WPA_GROUP_HANDSHAKE) continue; if (os_memcmp(wpa_s->go_dev_addr, dev_addr, ETH_ALEN) == 0) return 1;