summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-10 18:40:35 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-10 18:40:35 +0000
commitf43cdc0e357382e74ebf824e3d0b032e2e658d52 (patch)
tree2c120a43d2ca0bd84807633ef8f65e09cac02a80 /modules
parentf61147a82b21024c7a030bb53d4eff5db19e3b9b (diff)
modules/admin-full: add enable_vlan4k option to switch page
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua9
1 files changed, 9 insertions, 0 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 866cfe73a..2ca084b46 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
@@ -25,6 +25,8 @@ m.uci:foreach("network", "switch",
local num_ports = 5
local cpu_port = 5
+ local enable_vlan4k = false
+
-- Parse some common switch properties from swconfig help output.
local swc = io.popen("swconfig dev %q help 2>/dev/null" % switch_name)
if swc then
@@ -55,6 +57,9 @@ m.uci:foreach("network", "switch",
if is_vlan_attr then has_vlan4k = line:match(": (%w+)") end
if is_port_attr then has_ptpvid = line:match(": (%w+)") end
+ elseif line:match(": enable_vlan4k") then
+ enable_vlan4k = true
+
end
end
@@ -99,6 +104,10 @@ m.uci:foreach("network", "switch",
s:option(Flag, "enable_vlan", translate("Enable VLAN functionality"))
.cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end
+ if enable_vlan4k then
+ s:option(Flag, "enable_vlan4k", translate("Enable 4K VLANs"))
+ end
+
s:option(Flag, "reset", translate("Reset switch during setup"))
.cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end