From patchwork Thu Oct 17 13:36:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jimmy Chen X-Patchwork-Id: 1178610 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=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=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Sbt1Ct67"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="sVvc+hC7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 46v9FR4pRxz9sPJ for ; Fri, 18 Oct 2019 00:37:15 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=xauDltKzy5JE4uQWzQCW5eunlCqpNYw9d7mDG+WsxEA=; b=Sbt 1Ct6791YLo8UFpBy9YW9eqiYbqlkkiyr3BJRhVHc8KhO5/x7GsurABdyrNnVp2pCTI1IqoeuofaBc 9QnjFAXxldRF4xqOPIgDDlOxdMGK/j8eL/hpZxYnnuxJCQqQ7Pgcjd3o5aHzZGj7WchoHc5ABr1AB zNkddr5JnY3ZDX5OEvzbyOTw6wkIYE61aHTdH3FHs5aJ59mXv7QFrTwAYxyVL03ggIrNocKIn7dey gNpWno0AZ9eeWh9NtRvlVtRY8w/joWma0bi2Vwy5qngFFmIEczCafBt5tpw6PUnsovpUXl4DwYzLu G/PDlsMSGsj+tTl3KSTRxVg0vRTgn0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iL5xn-00086K-Dd; Thu, 17 Oct 2019 13:37:11 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iL5xi-00085I-QN for hostap@lists.infradead.org; Thu, 17 Oct 2019 13:37:08 +0000 Received: by mail-qt1-x841.google.com with SMTP id 3so3625447qta.1 for ; Thu, 17 Oct 2019 06:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2oZ9p9tLcQ1kTY5A3LyQDYqmO3S8FpUOe3/ZZ01Qc+I=; b=sVvc+hC7w9Ol2B+8OhEcIs82u8aOlyxDrNkk9153ua8K+bwSwgUXVnbSmrMyL/uQbQ tOxZKV2MW1aXRKIWLVcvTw5jIwu2mUh4Wa3dRQ9lezXkR+IFGM5q4ymr562yDDt8agSN inNwaYMI3w8ygF6OKMzUCFEcfCAyE2lw9yQ4uGPLrHlkJodZLZQ0USt681QsQNE3Zyaa CoYOmQGJeLh4Hu9xC+Sv4rPRb9JPkq7MRIpCm191vsYrPtNzjZcP6DguIbPAf9UP1vUV 8rbkND/F/pHOMJmyDoGmtZCr/7NztFWjwGWCUZ2yOivKmJCLZv+AWKjm9BM/3YDLsZ7A JdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2oZ9p9tLcQ1kTY5A3LyQDYqmO3S8FpUOe3/ZZ01Qc+I=; b=HK/EZFWtI1QAmBbhtQH8q14IwuKv8CnTeceK8u9I8mKHAWShXjTZpbJzTa+0I8qLR5 3olP4Xlg+rzgRDGadKPizeam40uUwst4TZyCi1jdV0XeCXlVUcDGcomU5+fsdA5+FPxI X4L9kyqlZ98jJhg/+0WGMHQO3UmIi/T/QquUAFiz2TkrP68T/p7XxpIpOcVHXv8FRvPf UPaT9Seubfwbb8VsRVuhm72K2Mgw6fReePX1FfSsXXQByIHAzkboqli3PuFnIF9I90fm LhyqzzxmLEsdSyUq5LPl/f9n5DEhdQuk77A8vN0ChPmPq+EqKG0zKMf+WKUQ7hKB8zrU ypsA== X-Gm-Message-State: APjAAAVe8adK4oIuXaYA2Msmnh7tbpUed7Q24z/Mc89W+jKT+GlRN4xK QWUjDHaFTtDQtAsdd/LOw2kNFGCv6uOwq9MYUit9iw97Yuk= X-Google-Smtp-Source: APXvYqxAKOZulVbdxILSRTyrd1rGeXLm/HfL+XnAwV1pgk2dPeU48/hDB/jK09q7PwBvKUKQ0OMnRIwTZKhSe6ahDx0= X-Received: by 2002:a0c:f792:: with SMTP id s18mr3842570qvn.20.1571319421890; Thu, 17 Oct 2019 06:37:01 -0700 (PDT) MIME-Version: 1.0 From: Jimmy Chen Date: Thu, 17 Oct 2019 21:36:50 +0800 Message-ID: Subject: [PATCH] p2p: continue listening next request if no post-PD operations To: hostap@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191017_063706_884291_84838D71 X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -15.7 (---------------) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-15.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:841 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_SPF_WL From: address is in the default SPF white-list -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.5 ENV_AND_HDR_SPF_MATCH Env and Hdr From used in default SPF WL Match -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 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 If no post-provision discovery operations, it should continue listening next request or this results in the p2p_find operation getting stopped (stuck in SEARCH state) unexpectedly. Signed-off-by: Jimmy Chen --- src/p2p/p2p.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) "Post-Provision Discovery operations started - do not try to continue other P2P operations"); diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index a08ba0268..24e429c59 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -3451,12 +3451,18 @@ static void p2p_prov_disc_resp_cb(struct p2p_data *p2p, int success) p2p->pending_action_state = P2P_NO_PENDING_ACTION; - if (!success) + if (!success) { + if (p2p->state == P2P_SEARCH) + p2p_continue_find(p2p); return; + } if (!p2p->cfg->prov_disc_resp_cb || - p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1) + p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1) { + if (p2p->state == P2P_SEARCH) + p2p_continue_find(p2p); return; + } p2p_dbg(p2p,