[PATCH v2 3/5] base-files: failsafe: Remove the VLAN modifier from interface name

Hauke Mehrtens hauke at hauke-m.de
Mon Jun 21 15:45:20 PDT 2021


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 <hauke at hauke-m.de>
---
 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 56e96c63baab..deb5f2ae3a25 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -97,6 +97,8 @@ preinit_config_board() {
 	else
 		# trim any vlan ids
 		ifname=${ifname%\.*}
+		# trim any vlan modifiers like :t
+		ifname=${ifname%\:*}
 	fi
 
 	pi_ifname=$ifname
-- 
2.30.2




More information about the openwrt-devel mailing list