Răsfoiți Sursa

brcm47xx: fix netconfig for inverted vlan?ports in nvram

This was observed on the Belkin Share F7D7302.

SVN-Revision: 38769
Hauke Mehrtens 12 ani în urmă
părinte
comite
32cbc948a1
1 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 4 2
      target/linux/brcm47xx/base-files/etc/init.d/netconfig

+ 4 - 2
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"
 		}