summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
Diffstat (limited to 'modules/admin-full')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua2
1 files changed, 2 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 b0de19133d..0fa2696e8a 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
@@ -202,10 +202,12 @@ 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)
vid.rmempty = false
vid.forcewrite = true
vid.vlan_used = { }
+ vid.datatype = "and(uinteger,range("..min_vid..","..mx_vid.."))"
-- Validate user provided VLAN ID, make sure its within the bounds
-- allowed by the switch.