Add local TTL option to dnsmasq
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 5 Jul 2012 17:46:32 +0000 (17:46 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 5 Jul 2012 17:46:32 +0000 (17:46 +0000)
-T, --local-ttl=<time>
    When replying with information from /etc/hosts or the DHCP leases
file dnsmasq by default sets the time-to-live field to zero, meaning
that the requestor should not itself cache the information. This is
the correct thing to do in almost all situations. This option allows a
time-to-live (in seconds) to be given for these replies. This will
reduce the load on the server at the expense of clients using stale
data under some circumstances.

[jow: change -T to --local--ttl to conform with the other options]

Signed-off-by: Andrew Byrne <openwrt@andy.id.au>
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

SVN-Revision: 32623

package/dnsmasq/files/dnsmasq.init

index 485a2f7b70d79859c18cb4d5b01d6bdef260f08d..15228da99ebe91650faeb8b84eee5d3e5de5d01b 100644 (file)
@@ -111,6 +111,7 @@ dnsmasq() {
        append_parm "$cfg" "resolvfile" "--resolv-file"
        append_parm "$cfg" "tftp_root" "--tftp-root"
        append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+       append_parm "$cfg" "local_ttl" "--local-ttl"
 
        config_get DOMAIN "$cfg" domain