[openwrt/openwrt] base-files: failsafe: Remove the VLAN modifier from interface name

LEDE Commits lede-commits at lists.infradead.org
Tue Jun 22 14:23:53 PDT 2021


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/790561d5109ef81537fdb8ceb8eb183c0cab077c

commit 790561d5109ef81537fdb8ceb8eb183c0cab077c
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Tue Jun 22 00:45:20 2021 +0200

    base-files: failsafe: Remove the VLAN modifier from interface name
    
    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 56e96c63ba..deb5f2ae3a 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



More information about the lede-commits mailing list