aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-11-11 23:04:47 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-11-11 23:04:47 +0000
commit92de1b3c5677b0ea732cdede05e8756c633147ac (patch)
tree54134fbb62bbe151d879bd3176832731722dae1b
parent1a205f982c96ca1fd1ab9b9e2854935164a5737d (diff)
downloadupstream-92de1b3c5677b0ea732cdede05e8756c633147ac.tar.gz
upstream-92de1b3c5677b0ea732cdede05e8756c633147ac.tar.bz2
upstream-92de1b3c5677b0ea732cdede05e8756c633147ac.zip
brcm47xx: fix netconfig for inverted vlan?ports in nvram
This was observed on the Belkin Share F7D7302. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38769 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xtarget/linux/brcm47xx/base-files/etc/init.d/netconfig6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
index 1bf948727b..d0ce9d3d48 100755
--- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
@@ -93,12 +93,14 @@ start() {
END {
if (((nvram["vlan0ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan1ports"] ~ /^4 8/ && (cpuport == "8"))) || \
- ((nvram["vlan1ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan2ports"] ~ /^4 8/ && (cpuport == "8")))) {
+ ((nvram["vlan1ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan2ports"] ~ /^4 8/ && (cpuport == "8"))) || \
+ ((nvram["vlan2ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan1ports"] ~ /^4 8/ && (cpuport == "8")))) {
c["vlan1ports"] = "0 1 2 3 8t"
c["vlan2ports"] = "4 8t"
}
if (((nvram["vlan0ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan1ports"] ~ /^4 5/ && (cpuport == "5"))) || \
- ((nvram["vlan1ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan2ports"] ~ /^4 5/ && (cpuport == "5")))) {
+ ((nvram["vlan1ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan2ports"] ~ /^4 5/ && (cpuport == "5"))) || \
+ ((nvram["vlan2ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan1ports"] ~ /^4 5/ && (cpuport == "5")))) {
c["vlan1ports"] = "0 1 2 3 5t"
c["vlan2ports"] = "4 5t"
}