X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_network%2Fdhcp.lua;h=3b030143e44007d639dc8fced20bc59e2676db5a;hp=d2984804081f8ab0ccaebdf6b52685c2d077f0f3;hb=9adbd79faa8b2d50e92bd2fd6bc21aabe396591f;hpb=28d10632a19dd50a3d0b7f7eb670d38fa1fa419c diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua index d29848040..3b030143e 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua @@ -214,9 +214,9 @@ cq.placeholder = 150 cs = s:taboption("advanced", Value, "cachesize", translate("Size of DNS query cache"), - translate("Maximum number of cached DNS entries")) + translate("Number of cached DNS entries (max is 10000, 0 is no caching)")) cs.optional = true -cs.datatype = "uinteger" +cs.datatype = "range(0,10000)" cs.placeholder = 150 s:taboption("tftp", Flag, "enable_tftp", @@ -297,6 +297,11 @@ mac = s:option(Value, "mac", translate("MAC mac.datatype = "list(macaddr)" mac.rmempty = true +function mac.cfgvalue(self, section) + local val = Value.cfgvalue(self, section) + return ipc.checkmac(val) or val +end + ip = s:option(Value, "ip", translate("IPv4-Address")) ip.datatype = "or(ip4addr,'ignore')"