luci-mod-admin-full: limit dns cachesize to 10000 1742/head
authorMarc Benoit <marcb62185@gmail.com>
Tue, 10 Apr 2018 00:47:32 +0000 (20:47 -0400)
committerMarc Benoit <marcb62185@gmail.com>
Tue, 10 Apr 2018 00:51:14 +0000 (20:51 -0400)
commitfbeea4ee33c877ce7d9412d0b98920bbb42466a4
tree621bc082a76eaac159bef5020b95af5f83d2223d
parentedd1fab34eaa98be624bbba17f60a8ae63744a98
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>
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua