mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
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
This commit is contained in:
parent
55bf670e56
commit
117f7697ec
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user