diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-27 00:02:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-27 00:02:10 +0000 |
commit | 327e4e773ab303d07d4d4dae43d220af03fc0e62 (patch) | |
tree | 0f13fb1ff3baea601a0354cbac995a3d0f6288b7 /modules/admin-full/luasrc | |
parent | 0bc7760cdb8918e1c61ce0c8232de09738346f52 (diff) |
modules/admin-full: don't bother with 4k vlan / no 4k vlan nuisances, simply enable it when available
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua | 16 |
1 files changed, 8 insertions, 8 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 ca1783d29..f16a7a0c6 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -92,10 +92,6 @@ m.uci:foreach("network", "switch", s:option(Flag, has_vlan, translate("Enable VLAN functionality")) end - if enable_vlan4k then - s:option(Flag, "enable_vlan4k", translate("Enable 4K VLANs")) - end - if has_learn then x = s:option(Flag, has_learn, translate("Enable learning and aging")) x.default = x.enabled @@ -164,11 +160,11 @@ m.uci:foreach("network", "switch", end end) - m.uci:set("network", sid, "device", switch_name) - m.uci:set("network", sid, "vlan", max_nr + 1) + m:set(sid, "device", switch_name) + m:set(sid, "vlan", max_nr + 1) if has_vlan4k then - m.uci:set("network", sid, has_vlan4k, max_id + 1) + m:set(sid, has_vlan4k, max_id + 1) end return sid @@ -244,7 +240,11 @@ m.uci:foreach("network", "switch", end end - m.uci:set("network", section, "ports", table.concat(p, " ")) + if enable_vlan4k then + m:set(sid, "enable_vlan4k", "1") + end + + m:set(section, "ports", table.concat(p, " ")) return Value.write(self, section, value) end |