diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-04-11 13:36:22 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-04-11 13:36:22 +0000 |
commit | c5557fc90b082c88cb2322fffc6c672330a21494 (patch) | |
tree | 5a62ddfb67cbbab536437ea618f5075bc5421e62 /modules/admin-full | |
parent | b066f75dd5509b77c33f6092a04c34a40a86cab1 (diff) |
modules/admin-full: attempt to determine switch cpu port from /proc/switch/eth0/cpuport in order to properly support newer broadcom models
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua | 3 |
1 files changed, 2 insertions, 1 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 0fa2696e8a..8fcf9af982 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -14,6 +14,7 @@ You may obtain a copy of the License at m = Map("network", translate("Switch"), translate("The network ports on this device can be combined to several <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s in which computers can communicate directly with each other. <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s are often used to separate different network segments. Often there is by default one Uplink port for a connection to the next greater network like the internet and other ports for a local network.")) +local fs = require "nixio.fs" local switches = { } m.uci:foreach("network", "switch", @@ -28,7 +29,7 @@ m.uci:foreach("network", "switch", local max_vid = 16 local num_vlans = 16 local num_ports = 6 - local cpu_port = 5 + local cpu_port = tonumber(fs.readfile("/proc/switch/eth0/cpuport") or 5) local switch_title local enable_vlan4k = false |