From patchwork Sat Jun 19 18:36:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1494695 X-Patchwork-Delegate: hauke@hauke-m.de 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.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.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=bombadil.20210309 header.b=3qVA6MzZ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=vgXrrp4+; 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 4G6l3V6SDrz9sRN for ; Sun, 20 Jun 2021 04:40:35 +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=1Bmk6/5oAf99RIks44XRaHmbHxz4wmRl+xOoHNLFMd0=; b=3qVA6MzZJP1fja LbkIRoTQTKkarKtt1CclO8h9TbUF3Y+mRjRnUrxEcjhaIIRppKaIbmFKMPV0ybkFuNbxN1BVXEosU UGaf0MyN7TAtsSkhRSNbIqNPMgmJsM69+TlDRj7uxvN8zqdP1Ny20NwKQN2mmIVmETSvLK8OmfSJY Af9i+1Y298xFWz66+gSYWxXFqGrdnGbnOOsSOh8LApO5W4n444Q53V5aIn4TI9X5TmnlFDeQP045Q 4iGO2rAVpQGZpwl2pjMpjp1bXBM21E4FyIE+MMKG3UO6RmaXkzMXs4Re9MKsc4gEa4GNgxGObh2qx cO85JXy8k3csLpJF8U4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufpn-00HPz6-WC; Sat, 19 Jun 2021 18:36:48 +0000 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufpY-00HPwz-Ho for openwrt-devel@lists.openwrt.org; Sat, 19 Jun 2021 18:36:34 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4G6kyf6bNSzQjbF; Sat, 19 Jun 2021 20:36:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1624127785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GnAAjoa6aXD6kgTajCH/tXIEAbPaeafElp4yB3Ngzgw=; b=vgXrrp4+6B6Sh2GaAt1LW5z7vt5cZchi93kknJnyfDvyKIFoBdeOefMSgv4pmtDuTFEQNv Vmlv9DhWw/k9wQq3xIOGxDvaqKy8f5fOMt8w43qj+2Cgi2Cx+905e0C7XUj+8jq1uWdl+u PpUYyHg9JhWmBRp/B4DwaNB5ZIrwSEn4QBBDZzwn7ORnwKGM81zMJQ4/0reXPH0rIP7R4l QLSiDLI2Q8LwYACaRRDsJ5uOtcRWy0CPiihX/xwn+xBUOR3oNE2NRBV2XZGqiA8gkkJkaQ iyO/MECtviDyFk1zvAcF9Mbjc7EzDYOYQ3hdsVyPewqyYNveZXAfVfCHc/xLsg== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id fjBLpnt1eh4y; Sat, 19 Jun 2021 20:36:23 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 1/3] base-files: failsafe: Fix IP configuration Date: Sat, 19 Jun 2021 20:36:09 +0200 Message-Id: <20210619183611.3334348-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -5.09 / 15.00 / 15.00 X-Rspamd-Queue-Id: F1D85188C X-Rspamd-UID: b2fb44 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210619_113632_929729_2BB0760F X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: Adapt the preinit_config_board() to the board.json network changes. It now looks for the device and the ports variables to configure the LAN network. This works with swconfig configurations. Fixes: FS#3866 Fixes: d42640e389a8 ("base-files: use "ports" array in board.json network for bridges") Signed-off-by: Hauke Mehrtens --- .../files/lib/preinit/10_indicate_preinit | [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:0:0:465:201 listed in] [list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 Adapt the preinit_config_board() to the board.json network changes. It now looks for the device and the ports variables to configure the LAN network. This works with swconfig configurations. Fixes: FS#3866 Fixes: d42640e389a8 ("base-files: use "ports" array in board.json network for bridges") Signed-off-by: Hauke Mehrtens Tested-by: Martin Blumenstingl # Reviewed-by: Rafał Miłecki --- .../files/lib/preinit/10_indicate_preinit | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index 3c5992979016..ae9fcfecc89e 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -72,28 +72,34 @@ preinit_config_board() { json_select network json_select "lan" - json_get_vars ifname + json_get_vars device + json_get_values ports ports json_select .. json_select .. - [ -n "$ifname" ] || return + [ -n "$device" -o -n "$ports" ] || return + + # swconfig uses $device and DSA uses ports + [ -z "$ports" ] && { + ports="$device" + } # only use the first one - ifname=${ifname%% *} + ports=${ports%% *} if [ -x /sbin/swconfig ]; then # configure the switch, if present json_get_keys keys switch for key in $keys; do - preinit_config_switch $key $ifname + preinit_config_switch $key $ports done else # trim any vlan ids - ifname=${ifname%\.*} + ports=${ports%\.*} fi - pi_ifname=$ifname + pi_ifname=$ports preinit_ip_config $pi_ifname } From patchwork Sat Jun 19 18:36:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1494696 X-Patchwork-Delegate: hauke@hauke-m.de 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.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.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=bombadil.20210309 header.b=h5F+FYmN; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=1ZQPWMWB; 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 4G6l4446jMz9sRN for ; Sun, 20 Jun 2021 04:41:08 +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:References:In-Reply-To: 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: List-Owner; bh=UIoW3cwg5f/lCIYRhfe4kPPi4Vsjwv2dZjAYXf7H8kY=; b=h5F+FYmNopsGFg TVZXHQabjkTntmeFEXzedG7nzX1nsTfItI8he+ONV4BQBhr2aggLjflsXkZF5RMn5/PvRDrSvsSmZ NbTbvnamsLYJo58a3fq9HYERQFIbjwwqg6BShg3vYW1XWUKpIFXNudbxCHHrSWtNhtTRonprM1jjr lTK4qQ0WXNACdXGZa7FA63CDIcYlFnMzIOATTMqZ3Vy1PShwUHKHPmgQ7PC/kyqFOGegkD3yPP3lJ Moy1uKzwhK2uvUZJjHWEVLRli51cPRoX5E+n/G1FaA6YlfkiAyQueEUrwFeIkIWCT+cYpgO3cf2Fd rRzYbffcmKENjMJ3qZDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufpc-00HPyB-FM; Sat, 19 Jun 2021 18:36:36 +0000 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufpY-00HPx0-F3 for openwrt-devel@lists.openwrt.org; Sat, 19 Jun 2021 18:36:34 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4G6kyg1Bp4zQjwG; Sat, 19 Jun 2021 20:36:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1624127785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jgfWQJoQdUdltrAjviI/e6bjhTjRMN1dIzgLXg5C1oI=; b=1ZQPWMWBrwbRj5BAmlC7Y7Ua+vkIppbG/XzLB51cAEDNs0tHnZxrindOPexiQ+YeGaXvhn D6TvXk1FU0yd0+AFt2LuZiUgv5JEovu4QDAk/A2V/tTbTE7OyjZARGRF2FMaszVHaTrI5q DiNWF9qZKpxiFZal3tmS9/OKbLuOC78qNGg0/HlctbVX7YTSxJBf8B43skiC2KNMp3X7Jj FCOFBA0NU1i4iNWCXcR9PxdgCDpgD2RoRGRofwaqmE/BkljNOcWps7PaTaziyn2RqailmD QxlH/u8qHpHbWfoThKrbQePy0+BIroISWZrOguCrJRxhyePJQxDCtQw+UPf51g== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id PAjKj6w58fND; Sat, 19 Jun 2021 20:36:24 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA Date: Sat, 19 Jun 2021 20:36:10 +0200 Message-Id: <20210619183611.3334348-2-hauke@hauke-m.de> In-Reply-To: <20210619183611.3334348-1-hauke@hauke-m.de> References: <20210619183611.3334348-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -5.09 / 15.00 / 15.00 X-Rspamd-Queue-Id: 3FF9617CF X-Rspamd-UID: b4f312 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210619_113632_931475_E3BE6058 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: On a DSA switch the ports have an upper device, the CPU device, e.g. eth0. This device has to be in up state to bring up the lower devices like lan1. Parse the link device from "ip link show" and bring it into up stated before bringing up the actual interface. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [80.241.56.151 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [80.241.56.151 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 On a DSA switch the ports have an upper device, the CPU device, e.g. eth0. This device has to be in up state to bring up the lower devices like lan1. Parse the link device from "ip link show" and bring it into up stated before bringing up the actual interface. This is needed to make network in failsafe on systems with DSA work. Signed-off-by: Hauke Mehrtens Tested-by: Martin Blumenstingl # --- package/base-files/files/lib/preinit/10_indicate_preinit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index ae9fcfecc89e..a3bc289dd663 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -12,6 +12,12 @@ preinit_ip_config() { fi grep -q "$netdev" /proc/net/dev || return + + # Get the link interface e.g. eth0 in lan1@eth0 + iflink=$(ip link show dev ${netdev} |sed -nr 's/.*@([a-zA-Z0-9]*): .*/\1/p') + if [ -n "$iflink" ]; then + ip link set dev $iflink up + fi if [ -n "$vid" ]; then ip link add link $netdev name $1 type vlan id $vid From patchwork Sat Jun 19 18:36:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1494697 X-Patchwork-Delegate: hauke@hauke-m.de 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.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.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=bombadil.20210309 header.b=PtsMjQ9K; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=iQr6qVhv; 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 4G6l450ymBz9sTD for ; Sun, 20 Jun 2021 04:41:09 +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:References:In-Reply-To: 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: List-Owner; bh=gn5EdpBrJ8O8UZ7WRX6JKrzOsyWhiYL9NIgqkrIn9PQ=; b=PtsMjQ9KHnvlFE iQu9fcPBaJsfS4/qWPaPnyX+/KYcfy0EQT+EZuz/VrgTh8YDtOZTOJ/C3Rsw+ue8V6Sd83FrgoNIk 7+rf/N14mtlP8dePbHw4zVJGNxNf1yl5/SF59gmfiu0m4L7b6AxHVVFIW3yqD8TgvXgOtfLzqdBP6 XcKzUzstZshshmhZG5R3iUBTAumKgezfeeHS2YMsIOgjPkjivpiOYNVuB6LoOCiHbExponwV67xXL ZUPi1xA/zkdaHBUGwQfvCuWGIY8sftvZd1c+Jsr8sQgxOxAUMwXLVFrdGLKbUPVOeCwALVM7mFT9h mrDK2itIU5NngTUAkoBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufq0-00HQ0F-BU; Sat, 19 Jun 2021 18:37:00 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lufpZ-00HPx1-54 for openwrt-devel@lists.openwrt.org; Sat, 19 Jun 2021 18:36:35 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4G6kyg4hDKzQjw8; Sat, 19 Jun 2021 20:36:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1624127785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P3pGAwZPSQgv9EBTLuKdaDunEg5/tZwopFQaE2VP0sw=; b=iQr6qVhvTCJKtM+0cXYZ7R/9WMgpFQXMXWACzKipz7HqvsuvPgvQ8IegDqyID1jW7Ha1zu M+iNvlsPGBXtym/EHtQuJkFnQt84VGkoYwaVvBONsY4sGYm4+uuI44ZFFvlvXgouzf310U xPAKNf9efTm7BiL+CLivpf3CmUHDk90rYFJCCqfECvzDl82BT0TD/hHbmm3jvUMUt3kWFv z9leJHbtgxNdvMPoewtUkfkOBtK7HZgL6e8DwKxDIRNzhx+wSKbRTGUi9AJHye3KY635CI MrZaFTG7N58t8KeDfRso3WtjzmBw2zeRR2K+0CgMbHl2iV+Js2bf6kf19SERoQ== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id Dw3vas4L-IjA; Sat, 19 Jun 2021 20:36:24 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH 3/3] base-files: failsafe: Remove the VLAN modifier from interface name Date: Sat, 19 Jun 2021 20:36:11 +0200 Message-Id: <20210619183611.3334348-3-hauke@hauke-m.de> In-Reply-To: <20210619183611.3334348-1-hauke@hauke-m.de> References: <20210619183611.3334348-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -4.78 / 15.00 / 15.00 X-Rspamd-Queue-Id: C91F81857 X-Rspamd-UID: 88f685 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210619_113633_382961_D3D38E5A X-CRM114-Status: UNSURE ( 6.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: Some interfaces have a VLAN modifier like :t in lan1:t, this modifier should be removed from the interface before calling preinit_ip_config(). Signed-off-by: Hauke Mehrtens --- package/base-files/files/lib/preinit/10_indicate_preinit | 2 ++ 1 file changed, 2 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [80.241.56.152 listed in list.dnswl.org] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 Some interfaces have a VLAN modifier like :t in lan1:t, this modifier should be removed from the interface before calling preinit_ip_config(). Signed-off-by: Hauke Mehrtens --- package/base-files/files/lib/preinit/10_indicate_preinit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index a3bc289dd663..2fa812e91f73 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -103,6 +103,8 @@ preinit_config_board() { else # trim any vlan ids ports=${ports%\.*} + # trim any vlan modifiers like :t + ports=${ports%\:*} fi pi_ifname=$ports