Comment 1 for bug 946754

Revision history for this message
Paul Sladen (sladen) wrote :

The manpage talks about:

 -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.

it's actually being run as:

  /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --cache-size=0 --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf

with '/var/run/nm-dns-dnsmasq.conf' containing just:

  server=10.0.0.5

(ie, the upstream DNS server).

The manpage also mentions:

       --clear-on-reload
              Whenever /etc/resolv.conf is re-read, clear the DNS cache. This is useful when new nameservers may have different data than
              that held in cache.

but this is for 'resolve.conf'. This corresponds to the enum OPT_RELOAD and ultimately gets used as:

           if (option_bool(OPT_RELOAD) && do_reload)
            clear_cache_and_reload(now);