diff options
author | Marc Benoit <marcb62185@gmail.com> | 2018-04-09 20:47:32 -0400 |
---|---|---|
committer | Marc Benoit <marcb62185@gmail.com> | 2018-04-09 20:51:14 -0400 |
commit | fbeea4ee33c877ce7d9412d0b98920bbb42466a4 (patch) | |
tree | 621bc082a76eaac159bef5020b95af5f83d2223d /modules/luci-mod-admin-full | |
parent | edd1fab34eaa98be624bbba17f60a8ae63744a98 (diff) |
luci-mod-admin-full: limit dns cachesize to 10000
The value of cachesize is hardcoded to 10000 in
dnsmasq-2.79/src/option.c to 10000 max
case 'c': /* --cache-size */
{
int size;
if (!atoi_check(arg, &size))
ret_err(gen_err);
else
{
/* zero is OK, and means no caching. */
if (size < 0)
size = 0;
else if (size > 10000)
size = 10000;
daemon->cachesize = size;
}
break;
}
Tested on Netgear R7800
Signed-off-by: Marc Benoit <marcb62185@gmail.com>
Diffstat (limited to 'modules/luci-mod-admin-full')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 d298480408..fbde431df8 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", |