From patchwork Wed Mar 3 10:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Kazior?= X-Patchwork-Id: 1446671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=CtxeZJwg; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=re2UX20v; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OlbJAwiH; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DrGWf18rpz9sCD for ; Thu, 4 Mar 2021 01:26:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=B7xyvbvj+3StUYzOqsvCkrCzYULxUJSVPnbrXf9B+sQ=; b=CtxeZJwg2cQDsAGwOCHDNI61Dr W4OpDrOMRhS0JULtisPY3LvXwDfWTiGfxChUTn/fEqqdRWG3VkPMLAPFZBeXvBW1PBtbL3BqemjEX UFyfTS8IsANMis0IH9x+7+LzDzr2HQXBm+fGcTfzTfZ9D62AoqTfsMfmgG4l0C//e5C92fdUXrFOa GI81l3IEXSrjKfBXfNp3loxR7oLPd5qqK9t78ts35MJM12I6sIxSFg2alazEwhUyFaZtbFIxv8/dH f1U3Hj2hBm7fHk/Y2ivSDvy9rZtxVjKCPZJ60NVYUWWDInRT4NS4mTozWjf4d1OjKBRwAYVR+iDHi K4lYNE0g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHSPk-005795-HB; Wed, 03 Mar 2021 14:23:48 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHS7u-0052wi-P5 for hostap@desiato.infradead.org; Wed, 03 Mar 2021 14:05:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=NcfXOW9ifnd3gQlzMfBNPR7eu1wfSPcK2Epdntbzv28=; b=re2UX20vpPNzkegdppgy77zBY4 fEP2ini/DVpWCam5xC2xaqR1t0tRXX0ABfnSjYKAt79KzbAiCPvk7V3Xt3pTG9y981r2/gpuPSZdC nINtSS5OVBlcDS2koOR2tfEk5sGQ+MNSYs/lcIhaIAgvWTJ753QlCizDSLSJ/S+oAHFH8iQF4RKiB GouWDYjq4iCg9cZMRGNW2fcFfmxB9XUIY/MP8yBu646hu/+AaNbZsNCA7xf+WfHObqO9pjLYXgOGB DFYdVm6+V+ofb6z9v17/XaQW4dJKJWg3pv6HEnGnCk8rnWNjTvTKGImoHWTESiPpXebnHPkTL6D0C B1P14viQ==; Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHOip-002BBJ-2W for hostap@lists.infradead.org; Wed, 03 Mar 2021 10:27:17 +0000 Received: by mail-lj1-x235.google.com with SMTP id u18so14303934ljd.3 for ; Wed, 03 Mar 2021 02:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NcfXOW9ifnd3gQlzMfBNPR7eu1wfSPcK2Epdntbzv28=; b=OlbJAwiHBUzcdnpzqkGG0DsUxv91+16ATk++sX/Q3skQi3Gt16oVZsbWI/lqfQKzui BkfUIbuvpJPvSg7MzPY4syQJlrBJMGwLuA14u72taN4k/X3XEc+4v+khZBIojhl5Dlyu NbW3YnXV7Aggh8BZh5Am6VxP7zAxgWP/znRPRLGxumWFSJIwFVd3yGJC3YZGzj2MX0vM ddHCf6EuSPA+T/GKdnqYwEspoqF9IRCuIcvV0xW9Y4o4Lt7GoMSm99zVCSHu6PyYmoa2 WdBllPg7pFUbJEUhUm/J2pm9eyaR5+t4WoXRzIl4yTKuvgpn2YhllcBJS/bsofJukyV8 A2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NcfXOW9ifnd3gQlzMfBNPR7eu1wfSPcK2Epdntbzv28=; b=f7OVzjs6WTYkQp03+rWukpk0HqVw/162f69NlS2WaxbFmJCgbu3e274p9XABdx74lZ ssXtpkYIE8kUcds33kdFXfsd08l8vcK8c+XLvAiSgOyz+ncnDYzGFCTX7dGjOenE7cuB Md1kAajbXn+tcM0xD4fTI50DYSv/I5uxcKVXpN46+IGndkPdCA3rxO0vY5TcXmp9ABg0 zEc06HBdumSmTn69FppEiWUgrbCwUmvUld1X331jkj//BlUYYZnj090ddfBwQEYMpQ3N gNWDPXrbh4Wc2oaxjZvzGOtibkOIhRUyZx6IR0m00/EOm+7SzctI1Eecb5e1iTE++NdO 4O/A== X-Gm-Message-State: AOAM530jQqkZ9gSiPqVhfBNNrklMMhdH0KY3/tvpPpBf8MxUOBDlvPkh htqDS8EiClO/Utj9W/ptkgnFQGR79v8= X-Google-Smtp-Source: ABdhPJxQtslk1YjOpWU725iXuddEE4TPi0hwobs9d7q8KQYkVUBhHNMh17mRzpYsbm8MeEvL5296IA== X-Received: by 2002:a2e:b5d8:: with SMTP id g24mr6463932ljn.64.1614767172397; Wed, 03 Mar 2021 02:26:12 -0800 (PST) Received: from drun:home-michalkazior-docker-linux-alpine.pl.plumewifi.com ([2a03:4b00:0:4:692:26ff:fed9:4198]) by smtp.gmail.com with ESMTPSA id h62sm2065299lfd.234.2021.03.03.02.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 02:26:11 -0800 (PST) From: Michal Kazior To: hostap@lists.infradead.org Cc: Michal Kazior Subject: [PATCHv2] DPP: prevent processing dpp action frames when stopped Date: Wed, 3 Mar 2021 10:26:05 +0000 Message-Id: <20210303102605.9891-1-kazikcz@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210303_102717_077992_BF9A0893 X-CRM114-Status: GOOD ( 11.02 ) X-Spam-Note: SpamAssassin invocation failed X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Michal Kazior DPP configurator params can be configured per interface. DPP listening can also be started and stopped per interface. However DPP rx processing was always doomed to process incomming frames even on interfaces which were not explicitly started to do DPP listen. This happened because not only the initial value but also because the dpp_allowed_roles could never be reset to 0. This would result in random failures in configuring Enrollees when running multiple AP interfaces if some of these APs happened to not have DPP configurator params set. Signed-off-by: Michal Kazior --- v2: * dropped the change from hostapd_dpp_init() src/ap/dpp_hostapd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c index e1e5a3ac4..da2dfe860 100644 --- a/src/ap/dpp_hostapd.c +++ b/src/ap/dpp_hostapd.c @@ -706,6 +706,7 @@ int hostapd_dpp_listen(struct hostapd_data *hapd, const char *cmd) void hostapd_dpp_listen_stop(struct hostapd_data *hapd) { + hapd->dpp_allowed_roles = 0; hostapd_drv_dpp_listen(hapd, false); /* TODO: Stop listen operation on non-operating channel */ }