[Bug 432432] New: dhclient shouldn't write empty resolv.conf
https://bugzilla.novell.com/show_bug.cgi?id=432432 Summary: dhclient shouldn't write empty resolv.conf Product: openSUSE 11.0 Version: Final Platform: All OS/Version: openSUSE 11.0 Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: wolfgang@rosenauer.org QAContact: qa@suse.de Found By: Customer I have the following scenario: I'm using NetworkManager on the laptop and now I'm connecting a Windows Mobile device via USB. This loads rndis_host and the synce stuff loads a script via HAL to setup the peer connection to the device using dhclient. With the default configuration my (NetworkManager managed) resolv.conf gets overwritten with an empty non-usable resolv.conf by dhclient. So my suggestion would be to not overwrite resolv.conf when no nameserver is returned from the DHCP server anyway. Another thing which could be probably done is to add some feature to be able to control the writing of resolv.conf via dhclient commandline or environment variable which can be used from these custom scripts calling dhclient. (I know the workaround is to set DHCLIENT_MODIFY_RESOLV_CONF to "no") -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |tambet@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User tambet@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c1 Tambet Ingo <tambet@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Tambet Ingo <tambet@novell.com> 2008-10-08 01:28:14 MDT --- NM uses netconfig now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c2 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #2 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-10-08 01:37:40 MDT --- Please elaborate how that would fix my problem? I haven't blamed NetworkManager at all. The script executes dhclient directly and this is overwriting /etc/resolv.conf with an invalid configuration. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User tambet@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c3 Tambet Ingo <tambet@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO Info Provider| |wolfgang@rosenauer.org --- Comment #3 from Tambet Ingo <tambet@novell.com> 2008-10-08 03:14:56 MDT --- I'm not sure now what you're saying. You say you use NetworkManager. In case of NetworkManager, the default dhclient script does not run at all, NetworkManager merges the configuration from all the activated devices and updates resolv.conf. In 11.0 it did that directly, in 11.1 it goes through netconfig (which is what is used without NM as well). The feature you're asking for is already implemented: Go to NetworkManager's connection editor, choose your connection, it's IP4 settings tab and "Automatic (DHCP) addresses only" with your static DNS information. Using random leftover DNS servers is not a solution: The DNS from previous connection is most likely not going to work with new connection (especially with public wifi, 3G modems, VPN). Does that solve your problem? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c4 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED Info Provider|wolfgang@rosenauer.org | --- Comment #4 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-10-08 03:25:13 MDT --- The fact that I use NetworkManager is not really related to the issue I mean. "I'm connecting a Windows Mobile device via USB. This loads rndis_host and the synce stuff loads a script via HAL to setup the peer connection to the device using dhclient." So udev and hal are setting up a new eth device and start dhclient directly. This issue is only interesting for the dhclient package maintainer IMO. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 Tambet Ingo <tambet@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|tambet@novell.com |mt@novell.com Status|REOPENED |NEW -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c6 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |wolfgang@rosenauer.org --- Comment #6 from Marius Tomaschewski <mt@novell.com> 2008-10-08 10:24:11 MDT --- (In reply to comment #4 from Wolfgang Rosenauer)
The fact that I use NetworkManager is not really related to the issue I mean. "I'm connecting a Windows Mobile device via USB. This loads rndis_host and the synce stuff loads a script via HAL to setup the peer connection to the device using dhclient."
So udev and hal are setting up a new eth device and start dhclient directly. This issue is only interesting for the dhclient package maintainer IMO.
Can you set DHCLIENT_DEBUG="yes" in /etc/sysconfig/network/dhcp and provide /var/log/dhclient-script log file after it happened, please? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c7 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|wolfgang@rosenauer.org | --- Comment #7 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-10-10 00:48:35 MDT --- Created an attachment (id=244796) --> (https://bugzilla.novell.com/attachment.cgi?id=244796) dhclient log -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c8 --- Comment #8 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-10-20 07:54:00 MDT --- ok, just found that NetworkManager actually obeys DHCLIENT_MODIFY_RESOLV_CONF="no" as well which renders my workaround useless. So I don't see any way to keep dhclient from replacing a working resolv.conf with a useless one without hacking any scripts for my special case which should be solved. My special case would be solved if dhclient would recognize that it got no DNS data from the server and not writing a resolv.conf at all. Looks like a simple fix to me. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c9 --- Comment #9 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-10-20 08:00:27 MDT --- I've just added this line to my /sbin/dhclient-script script (line 70): test -z $new_domain_name_servers && return and it seems to work for me correctly. This could probably be improved a little bit but it does for my config. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c10 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |wolfgang@rosenauer.org --- Comment #10 from Marius Tomaschewski <mt@novell.com> 2008-12-05 09:27:51 MST --- Can you test if it works for you with home:mtomaschewski:11.0/dhcp (even your custom setup seems to be a special case and not directly supported neither by NM nor by ifup)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c11 --- Comment #11 from Marius Tomaschewski <mt@novell.com> 2008-12-05 09:30:47 MST --- http://download.opensuse.org/repositories/home://mtomaschewski://11.0/openSU... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User wolfgang@rosenauer.org added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c12 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|wolfgang@rosenauer.org | --- Comment #12 from Wolfgang Rosenauer <wolfgang@rosenauer.org> 2008-12-08 03:38:00 MST --- (In reply to comment #10 from Marius Tomaschewski)
Can you test if it works for you with home:mtomaschewski:11.0/dhcp (even your custom setup seems to be a special case and not directly supported neither by NM nor by ifup)?
It's obviously not supported since it's using SynCE what is not even distributed by openSUSE but nevertheless ;-) Ok, the issue is that I got a new machine and already installed 11.1rc1 on it. Whatever changed but I can't reproduce the problem currently. After connecting the ActiveSync device I still have the correct NetworkManager delivered nameserver ip address in /etc/resolv.conf. dhclient is running on the new device but resolv.conf doesn't get overwritten. So it seems that can be marked as fixed for 11.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c13 --- Comment #13 from Marius Tomaschewski <mt@novell.com> 2008-12-08 06:06:54 MST --- On 11.1 all things are implemented differently. The dhclient-script as well as the NetworkManager deliver the settings (DNS, NIS, NTP) to /sbin/netconfig; netconfig script writes the settings using NETCONFIG_DNS_POLICY to the files. See "man 8 netconfig" and "grep ^NETCONFIG /etc/sysconfig/network/config". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c17 --- Comment #17 from Marius Tomaschewski <mt@novell.com> 2009-01-07 05:29:00 MST --- Note, that the "NetworkManager" policy in netconfig is an _internal_ one and even setting the policy as in comment #15 may not work because of some further checks that are done. A cp /etc/netconfig.d/dns-resolver /etc/netconfig.d/dns-my-resolver and adding it to NETCONFIG_MODULES_ORDER allows you to change them. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432432 User mt@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=432432#c19 --- Comment #19 from Marius Tomaschewski <mt@novell.com> 2009-02-12 04:06:58 MST --- Update package (patch as in comment #9 and more) is on the way. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com