GNOME Bugzilla – Bug 353265
NetworkManager doesn't clean up resolv.conf when deactivating device
Last modified: 2008-03-26 22:32:42 UTC
NetworkManager doesn't clean up resolv.conf file when deactivating device - at least when named-manager has only one configuration in its config list. Reproducible: always Steps to reproduce: 1. Open NetworkManager and connect to your favorite wireless network (I guess wired networks are affected, too, but haven't tested it). 2. Deactivate your wireless device - for instance, shut down NetworkManager daemon. Expected results: - The corresponding entries (nameserver/search) are removed from /etc/resolv.conf (comments in the code and common sense suggest that this should be the case). Actual results: - Nothing happens - the entries corresponding to the deactivated device are still present in /etc/resolv.conf The bug is in the src/named-manager/nm-named-manager.c:rewrite_resolv_conf() function which silently returns TRUE when passed NULL as a configuration (it assumes that "there is nothing to do" in this case). This is wrong behaviour: instead, rewrite_resolv_conf() should write an empty /etc/resolv.conf in this case (as suggested by nm_named_manager_remove_ip4_config() code). The supplied patch solves the problem.
Created attachment 71786 [details] [review] The propsed fix for the problem outlined above
Ping :-) Any comments on the bug?
I think this is fixed in the latest SVN... as part of http://svn.gnome.org/viewvc/NetworkManager?view=revision&revision=981 but it might not have been committed to the 0.6 branch...
committed to stable, r3505, thanks!