]> git.ipfire.org Git - people/ms/dnsmasq.git/blobdiff - src/dnsmasq.c
Update DNSSEC timestamp file on process TERM.
[people/ms/dnsmasq.git] / src / dnsmasq.c
index 514e10bdf206cb966d1dc41fe63e15429794c61e..04d57580f24bfc7af41c15e4a70ec4ac614cebd7 100644 (file)
@@ -1321,6 +1321,15 @@ static void async_event(int pipe, time_t now)
        if (daemon->lease_stream)
          fclose(daemon->lease_stream);
 
+#ifdef HAVE_DNSSEC
+       /* update timestamp file on TERM if time is considered valid */
+       if (daemon->back_to_the_future)
+         {
+            if (utime(daemon->timestamp_file, NULL) == -1)
+               my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno));
+         }
+#endif
+
        if (daemon->runfile)
          unlink(daemon->runfile);