After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353265 - NetworkManager doesn't clean up resolv.conf when deactivating device
NetworkManager doesn't clean up resolv.conf when deactivating device
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
0.6.6
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2006-08-28 16:34 UTC by Valentine Sinitsyn
Modified: 2008-03-26 22:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The propsed fix for the problem outlined above (940 bytes, patch)
2006-08-28 16:38 UTC, Valentine Sinitsyn
none Details | Review

Description Valentine Sinitsyn 2006-08-28 16:34:47 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.
Comment 1 Valentine Sinitsyn 2006-08-28 16:38:33 UTC
Created attachment 71786 [details] [review]
The propsed fix for the problem outlined above
Comment 2 Valentine Sinitsyn 2006-11-14 11:44:33 UTC
Ping :-)
Any comments on the bug?
Comment 3 Christopher Aillon 2007-12-29 18:54:26 UTC
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...
Comment 4 Dan Williams 2008-03-26 22:32:42 UTC
committed to stable, r3505, thanks!