From patchwork Wed Apr 3 12:16:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1075569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nCw8oci0"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Yzbb0ClWz9sRs for ; Wed, 3 Apr 2019 19:22:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hlBc7Z9WuK9ykLguO/bVtALNzYQMQfBeF1yWnUeAzJs=; b=nCw8oci0bGv3p3 TyNrgSPwMZfZmwiwnM6izHYiQYEl7GXJmvA347wILg4hf4Ew9CUeX23vkk0L7Dx7xtZ4KEaN8MT72 G+mYY7xJ9a+/+rfEs+7uGoqU1R8/AF1ZaqGCjUVDd8t4yXPqqV4e/Y9DZ83tHp9jGkV/EEZ1Mf0qn q2HVGc9QkHk2ZzjJ6uwRtuS3qy87c1AAlH8//crjOE+MlE6ZMbL67o8VcLArVCQcGrUW/CWNpdeUi agUslR4pBcBr+Te0U5zm8/WBoyktQdmpGIWOTAwz7a1dtEabtr94DlHi7QRGUBAHJb7/DaXF1l5Jf o+bJW9goM+eDM1S+p7rQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBbAU-0001P6-G9; Wed, 03 Apr 2019 08:22:46 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBbAS-0001OO-1h for hostap@lists.infradead.org; Wed, 03 Apr 2019 08:22:45 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2019 01:22:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,304,1549958400"; d="scan'208";a="220098058" Received: from andrei-xps-12-9q33.jer.intel.com ([10.12.190.129]) by orsmga001.jf.intel.com with ESMTP; 03 Apr 2019 01:22:41 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] EAP: Remove unreachable code in EAP auth SM Date: Wed, 3 Apr 2019 15:16:12 +0300 Message-Id: <20190403121615.4094-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_012244_103227_DFAD710E X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilan Peer Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ilan Peer Signed-off-by: Ilan Peer --- src/ap/wpa_auth.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 616b20592c..03806eb093 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -3302,16 +3302,9 @@ SM_STATE(WPA_PTK, PTKINITDONE) } } - if (0 /* IBSS == TRUE */) { - sm->keycount++; - if (sm->keycount == 2) { - wpa_auth_set_eapol(sm->wpa_auth, sm->addr, - WPA_EAPOL_portValid, 1); - } - } else { - wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid, - 1); - } + wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid, + 1); + wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyAvailable, 0); wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyDone, 1); if (sm->wpa == WPA_VERSION_WPA)