Package: dnsmasq
Version: 2.55-2
Severity: minor

Dnsmasq's resolvconf update script /etc/resolvconf/update.d/dnsmasq
ends with this:

-----------------BEGIN QUOTE-------------
# dnsmasq uses the mtime of the file to detect changes. This has a
resolution of one second,
# so it's possible that if two or more changes occur rapidly, the
second change could
# be missed.  We avoid this possibility by delaying here.
sleep 1
-----------------END QUOTE-------------

The *problem* may be real.
1. Resolvconf updates /var/run/dnsmasq/resolv.conf.
2. Dnsmasq notices this and re-reads the file.
3. Resolvconf updates the file again within one second.
4. Dnsmasq doesn't notice this because the mtime (rounded
   to nearest second) hasn't changed.

The *bug* is that the "sleep 1" in the update script works
around this problem in an unaccepable way, namely, by
prolonging the whole resolvconf update process by a full second.
Note that the "sleep 1" causes the *caller* of /sbin/resolvconf
to sleep an extra second.

Better would be for dnsmasq to look at the nanosecond-resolution
mtime instead of the second-resolution mtime.

$ ls -l --full-time /var/run/dnsmasq/resolv.conf
-rw-r--r-- 1 root root 5 2011-05-24 09:47:07.060875947 +0200
/var/run/dnsmasq/resolv.conf

Then it would be sure to notice all changes.
-- 
Thomas Hood
Resolvconf maintainers



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to