[OpenWrt-Devel] [RFC][PATCH] brcm47xx: drop network configs with VID 0

Rafał Miłecki zajec5 at gmail.com
Tue Jun 24 06:13:33 EDT 2014


Old OpenWrt releases were using network configs that are not valid
anymore. They specified tagging in a different way (or were not tagging
CPU at all), used VID 0 which is a reserved value.
Porting old configs would be tricky (changing VIDs, interfaces names,
ports tagging), so it's probably wiser to drop them.

Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
---
 target/linux/brcm47xx/base-files/etc/init.d/netconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
index ced2a42..273c4ec 100755
--- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
@@ -4,6 +4,11 @@
 START=05
 
 start() {
+	# Configs from old releases (10.03, 12.09) are not compatible with BB+
+	# They used to use reserved 0 VID and didn't tag CPU port
+	uci show network | grep "\.vlan=0"
+	[ $? -eq 0 ] && rm /etc/config/network
+
 	[ -e /etc/config/network ] && {
 		local batch
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list