From patchwork Mon Jul 20 15:03:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1332462 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=david-bauer.net 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=merlin.20170209 header.b=gcMkmEjp; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4B9Q5T3wBwz9sTM for ; Tue, 21 Jul 2020 01:05:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From: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=Og1b7S4D0g1z0uQ1OmOjJwc54kCnKaJ1jqOXnG8JxSc=; b=gcMkmEjpHMAJVvjfa3wM3HPGyw T7KtSgb1/8TTKzFpe0Xq1it/eK8KKk6QisNoX9ZINiyv5rznRLqKEciATnSBT+YBCqGprysA0kLGw vK3CnL/duFKgsIWbhjb6cRkcaq+uv3bm12kBd74NpMblvlXx0j95zxb1s/6gEOH4dMNFMAxRyBXi0 crZjB+uhfTet7tJqP//JSVdAYkedsgCOMBzzIV+nQ5bhPkQn6nYxcuzD1iMYfVo95pQ8GVA81v7dt IAOVABiPZL/z1uAeb+0a5bOJh48ZVf0dNqAiA8FXtokcdZf6Ropg11TegRk0PnawJYQtjE6SFNdaJ LkYVmHdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxXKV-0007eR-PD; Mon, 20 Jul 2020 15:03:47 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxXKT-0007dk-6o for openwrt-devel@lists.openwrt.org; Mon, 20 Jul 2020 15:03:46 +0000 Received: from dbauer-t470.home.david-bauer.net (p200300e53f06360039cade78b2a18973.dip0.t-ipconnect.de [IPv6:2003:e5:3f06:3600:39ca:de78:b2a1:8973]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id BC1C81E523 for ; Mon, 20 Jul 2020 17:03:40 +0200 (CEST) From: David Bauer To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/2] hostapd: fix incorrect service name Date: Mon, 20 Jul 2020 17:03:14 +0200 Message-Id: <20200720150315.205602-1-mail@david-bauer.net> 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-20200720_110345_351057_C23C944D X-CRM114-Status: GOOD ( 10.98 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org When retrieving the PID for hostapd and wpa_supplicant via ubus the wrong service name is currently used. This leads to the following error in the log: netifd: radio0 (1409): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process path (/proc/exe) Fixing the service name retrieves the correct PID and therefore the warning won't occur. Signed-off-by: David Bauer --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- package/network/services/hostapd/files/hostapd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 5214704830..864b15e120 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -993,7 +993,7 @@ drv_mac80211_setup() { add_ap=1 ubus wait_for hostapd ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}" - local hostapd_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['hostapd'].pid") + local hostapd_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid") wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 fi ret="$?" diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index f4e2aa559c..268a41a82b 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -1125,7 +1125,7 @@ wpa_supplicant_run() { [ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED - local supplicant_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['supplicant'].pid") + local supplicant_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['supplicant'].pid") wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1 return $ret