On 23/10/12 20:21, Gene Czarcinski wrote:
It would be useful to libvirt if dnsmasq would reread the configuration
file and/or the files in the configuration directory upon demand (via
SIG<something>) as is done for some other files.

Right now, when minor changes are made to a network configuration, it is
necessary to restart dnsmasq to get those changes adopted.

Is this a possibility this could be done or is this one of those things
that yes, it could be done, but it would require rewriting most of
dnsmasq. What types of changes might be accommodated? What if these
changeable definitions were put into a special configuration file?

Example: v6 or v6 dhcp-range.

Example of something that would unlikely be possible: interface=


The most difficult problem is that dnsmasq throws away root permissions after start-up, so re-reading the configuration is impossible if acting on the new configuration involves anything that needs root (for instance, binding sockets to ports <1024 or opening the lease file.)

The philosophy is that things that would be really useful to change, without restarting dnsmasq, and certainly don't need root, are re-read on SIGHUP. That's dhcp-host information and dhcp-option information in special configuration files, /etc/hosts and /etc/ethers, and possibly /etc/resolv.conf, if it's not being polled anyway.

For anything else, restarting dnsmasq is a pain-free operation anyway: there's very little state and nothing important is lost over a reboot.


Cheers,

Simon.

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to