aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-02-16 12:37:24 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-02-16 12:37:24 +0000
commit117f7697ec09d0ca69959882c4454d41b6794e7f (patch)
treeaeaaa8cd3a0bd4a2576179a4716097ee6821b58e /target
parent55bf670e5612b75540d9897e924a24065fb1e994 (diff)
downloadmaster-187ad058-117f7697ec09d0ca69959882c4454d41b6794e7f.tar.gz
master-187ad058-117f7697ec09d0ca69959882c4454d41b6794e7f.tar.bz2
master-187ad058-117f7697ec09d0ca69959882c4454d41b6794e7f.zip
brcm47xx: try to automatically detect if the wan port is at port 4 and not at port 0.
This should fix #13000. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35617 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/brcm47xx/base-files/etc/init.d/netconfig13
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"