diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-04-11 17:32:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-04-11 17:32:24 +0000 |
commit | ae2e8c99b1f027ace8fb7678dc7002477c84b9a8 (patch) | |
tree | 7b506952281d71368884f9758e459b0351c13035 | |
parent | c5557fc90b082c88cb2322fffc6c672330a21494 (diff) |
modules/admin-full: also increase number of ports if cpu port is 8
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua index 8fcf9af98..155722669 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -28,8 +28,8 @@ m.uci:foreach("network", "switch", local min_vid = 0 local max_vid = 16 local num_vlans = 16 - local num_ports = 6 local cpu_port = tonumber(fs.readfile("/proc/switch/eth0/cpuport") or 5) + local num_ports = cpu_port + 1 local switch_title local enable_vlan4k = false @@ -203,7 +203,7 @@ m.uci:foreach("network", "switch", local vid = s:option(Value, has_vlan4k or "vlan", "VLAN ID", "<div id='portstatus-%s'></div>" % switch_name) - local mx_vid = has_vlan4k and 4094 or (num_vlans - 1) + local mx_vid = has_vlan4k and 4094 or (num_vlans - 1) vid.rmempty = false vid.forcewrite = true |