From patchwork Wed May 13 06:59:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 2237503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=tnKnuRL0; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=G12HNl0E; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4gFkrp3Qhnz1yLT for ; Wed, 13 May 2026 17:01:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=NAOwAAP9rclMYIdHGSadwmj/9TE+FwIVFYkNUvDC4dw=; b=tnKnuRL0W4da9b Bz3tYDD90Qu40sgM+vqzSIkH8OddRDI9bvbYHGQUFoQEBJLNHTHPRKQYLL0S6q0UJktYonRTrN6Lm FLw+IWL0SD6t/pPa7R/xDoI7Wh/996G8GkT8ObD0gw2BGWs9yQRJfXMC62SICDvbgttkcMaLk4ZWM MFbgDoUrKgI38uSG4R61vacR8DPTRcuvRqxpsssRMFd7KsS10Oah/GQlNqV8X+pO1hTwwfFMt1Apy JDWNSTnYrr/QlX4gNooBMKxT6OVmRVowONRnf9BHDSCwfKgs+sFa+HIHiN9xYgU/O2XPCZwRJnyvL h4ICWRrI+4Fl4SOrddWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wN3Z6-00000001UZ9-2mF3; Wed, 13 May 2026 06:59:32 +0000 Received: from mgamail.intel.com ([198.175.65.10]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wN3Z3-00000001UWo-3WOW for hostap@lists.infradead.org; Wed, 13 May 2026 06:59:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778655570; x=1810191570; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8ROn6kZPEq4BoRq2jHRTFiwXBgBlrD2U/dTp7MCQnjk=; b=G12HNl0ECvXp32zMj4iO7OcO59qOsp7nGjEQJreUMIR9nZDp3AtJBW3v kAoj/QymjeKhswN9q1w2/OYumaLoxyJSdUO/RoBgA/3lSieT5CZqPzjvY 7N+Ot2wCALOrMkC4rRUDnsd5Gl6ID3ZoauziTBceLsjBJSZPoxx33jhA8 7taYlLtk4wfid2Q/VCRMDple152MvlPzYStK+1zPKFOLvAtYljD4OVxsY MoxNEaEw++d63QdhOcrrpl7JN7IMqlUPO/WQZIC9HTW69al3bV6KfnTy3 /4nCFtdzz0tMQEtEEmt4MuWua7fbQaRLuayzmr2IwJr7dKCY/86kBhrCb Q==; X-CSE-ConnectionGUID: sBG/6xQdSD69jb7EKpV4/w== X-CSE-MsgGUID: +sccvj0JRzGLlCa5dQ7GDQ== X-IronPort-AV: E=McAfee;i="6800,10657,11784"; a="97001299" X-IronPort-AV: E=Sophos;i="6.23,232,1770624000"; d="scan'208";a="97001299" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 23:59:30 -0700 X-CSE-ConnectionGUID: EPcfphHNRGOqdEt+hV1b/A== X-CSE-MsgGUID: mCnST6FNTz2miFfjnaZMSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,232,1770624000"; d="scan'208";a="233721900" Received: from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com) ([10.167.28.6]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 23:59:28 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: maheshkkv@google.com, vamsin@qti.qualcomm.com, Andrei Otcheretianski Subject: [PATCH] wpa_supplicant: Store absolute path to P2P config file Date: Wed, 13 May 2026 09:59:02 +0300 Message-ID: <20260513065909.12048-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260512_235930_551144_0267AB80 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.8 (----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When wpa_supplicant is daemonized, relative paths are not valid anymore. If the P2P device is toggled (disabled/enabled) when wpa_supplicant runs with -B option, the configuration isn't found and P2P [...] Content analysis details: (-4.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.175.65.10 listed in list.dnswl.org] 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_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.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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.4 DKIMWL_WL_HIGH DKIMwl.org - High trust sender -0.0 DMARC_PASS DMARC pass policy 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 When wpa_supplicant is daemonized, relative paths are not valid anymore. If the P2P device is toggled (disabled/enabled) when wpa_supplicant runs with -B option, the configuration isn't found and P2P device interface can't be re-added. Signed-off-by: Andrei Otcheretianski --- wpa_supplicant/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c index ec8a90bc09..eeb3606ade 100644 --- a/wpa_supplicant/main.c +++ b/wpa_supplicant/main.c @@ -275,7 +275,8 @@ int main(int argc, char *argv[]) goto out; #ifdef CONFIG_P2P case 'm': - params.conf_p2p_dev = optarg; + os_free(params.conf_p2p_dev); + params.conf_p2p_dev = os_rel2abs_path(optarg); break; #endif /* CONFIG_P2P */ case 'o': @@ -432,6 +433,9 @@ out: os_free(params.match_ifaces); #endif /* CONFIG_MATCH_IFACE */ os_free(params.pid_file); +#ifdef CONFIG_P2P + os_free(params.conf_p2p_dev); +#endif /* CONFIG_P2P */ crypto_unload(); os_program_deinit();