diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-16 12:37:24 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-16 12:37:24 +0000 |
commit | d9580d224a7e19e65a655eb14e0b442d6a7ff03d (patch) | |
tree | 75f5e191f9a507620bef68d4a162d90dfe9346ae /target | |
parent | 7f20c2e19a3246dbb20772f8cfd67296daff1172 (diff) | |
download | master-31e0f0ae-d9580d224a7e19e65a655eb14e0b442d6a7ff03d.tar.gz master-31e0f0ae-d9580d224a7e19e65a655eb14e0b442d6a7ff03d.tar.bz2 master-31e0f0ae-d9580d224a7e19e65a655eb14e0b442d6a7ff03d.zip |
brcm47xx: try to automatically detect if the wan port is at port 4 and not at port 0.
This should fix #13000.
SVN-Revision: 35617
Diffstat (limited to 'target')
-rwxr-xr-x | target/linux/brcm47xx/base-files/etc/init.d/netconfig | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig index 2b1a66d33d..98747f5803 100755 --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig @@ -101,11 +101,22 @@ start() { } } - ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) { + ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) || \ + ($1 ~ /^vlan[0-9]{1,2}ports$/) { nvram[$1] = $2 } 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")))) { + c["vlan0ports"] = "0 1 2 3 8" + c["vlan1ports"] = "4 8" + } + 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")))) { + c["vlan0ports"] = "0 1 2 3 5" + c["vlan1ports"] = "4 5" + } if ((model == "ASUS WL-HDD") || (model == "ASUS WL-300g") || (model == "Linksys WAP54G V1")) { c["wan_ifname"] = "" c["lan_ifname"] = "eth1" |