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=b7b73d78d0d61efe64ff0ba9d4696f48133f8e35;hb=9adbd79faa8b2d50e92bd2fd6bc21aabe396591f;hpb=9dcf73b323fa97534a931e3acfbab8b03ce3961f 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 b7b73d78d..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 @@ -115,7 +115,7 @@ s:taboption("advanced", Flag, "nonegcache", s:taboption("advanced", Value, "serversfile", translate("Additional servers file"), translate("This file may contain lines like 'server=/domain/1.2.3.4' or 'server=1.2.3.4' for".. - "domain-specific or full upstream DNS servers.")) + "domain-specific or full upstream DNS servers.")) s:taboption("advanced", Flag, "strictorder", translate("Strict order"), @@ -212,6 +212,12 @@ cq.optional = true cq.datatype = "uinteger" cq.placeholder = 150 +cs = s:taboption("advanced", Value, "cachesize", + translate("Size of DNS query cache"), + translate("Number of cached DNS entries (max is 10000, 0 is no caching)")) +cs.optional = true +cs.datatype = "range(0,10000)" +cs.placeholder = 150 s:taboption("tftp", Flag, "enable_tftp", translate("Enable TFTP server")).optional = true @@ -291,11 +297,16 @@ 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')" time = s:option(Value, "leasetime", translate("Lease time")) -time.rmempty = true +time.rmempty = true duid = s:option(Value, "duid", translate("DUID")) duid.datatype = "and(rangelength(20,36),hexstring)"