Merge pull request #1742 from fantom-x/dhcp_cachesize_max
authorHannu Nyman <hannu.nyman@iki.fi>
Tue, 10 Apr 2018 14:36:29 +0000 (17:36 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Apr 2018 14:36:29 +0000 (17:36 +0300)
luci-mod-admin-full: limit dns cachesize to 10000

modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua

index d298480..fbde431 100644 (file)
@@ -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",