GNOME Bugzilla – Bug 551747
NetworkManager should update dnsmasq via DBus
Last modified: 2010-09-15 15:13:07 UTC
This was originally reported against Ubuntu: https://bugs.launchpad.net/bugs/192643 Instead of overwriting /etc/resolv.conf with new nameserver info, NetworkManager should send updates to dnsmasq via DBus when dnsmasq is in use. A patch providing this functionality was posted to the networkmanager-list recently. http://mail.gnome.org/archives/networkmanager-list/2008-September/msg00046.html
Created attachment 120912 [details] [review] Proposed patch Just to keep everything in one place, instead of referring to the mailing list posting.
I'm working on local caching nameserver support in the branch 'cachingdns', where I"ve decided to implement this a bit differently. Instead of expecting an existing instance of dnsmasq, where we have no idea of the configuration or what options have been given to it (ie, is it actually listening on localhost/127.0.0.1?) we'll manually spawn our own dnsmasq using known options and write the correct DNS info to the config file. This appears to work better with other instances of dnsmasq that are run by stuff like libvirt or the NM connection sharing functionality. I've already had to fix stuff like that with the connection sharing functionality by giving dnsmasq a bogus config file path to ensure that an existing (default) /etc/dnsmasq.conf doesn't screw up operation... Perhaps in the future we can move to using DBus, but we'll need to take more steps to prevent users from inadvertently falling into holes due to random configuration that conflicts with the local caching nameserver case.