Bug 146389 - NetworkManager-0.3.3-1.cvs20050119.2.fc3 doesn't set search in resolv.conf
NetworkManager-0.3.3-1.cvs20050119.2.fc3 doesn't set search in resolv.conf
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Colin Walters
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-27 14:54 EST by Thomas J. Baker
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-12 10:49:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
partial /var/log/messsages showing nm messages (9.06 KB, text/plain)
2005-01-31 14:44 EST, Thomas J. Baker
no flags Details
really use searches (592 bytes, patch)
2005-01-31 20:25 EST, Colin Walters
no flags Details | Diff
Do searches v2 (1.86 KB, patch)
2005-02-01 21:46 EST, Dan Williams
no flags Details | Diff

  None (edit)
Description Thomas J. Baker 2005-01-27 14:54:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5)
Gecko/20041110 Firefox/1.0

Description of problem:
After upgrading to said version, NM doesn't create the resolv.conf
with a search directive so non-FQDNs don't work. This is quite
annoying and I'm wondering if it's a bug or a feature? 

Version-Release number of selected component (if applicable):
NetworkManager-0.3.3-1.cvs20050119.2.fc3

How reproducible:
Always

Steps to Reproduce:
1. connect to a wireless network and get a dhcp address
2.
3.
    

Actual Results:  NM creates a resolv.conf that doesn't have the search
domain returned by the DHCP server.

Additional info:

I'm using ipw2200 driver in the kernel. (As an aside, what's the
reason for not putting the newer version in the kernel anyway?
Probably not your bag but Dave must have a reason?)
Comment 1 Dan Williams 2005-01-29 17:43:36 EST
-> Colin

(WRT ipw2200, we mostly try to stay with upstream kernels for Fedora,
so when the ipw drivers are upstream, they'll get into fedora...)
Comment 2 Colin Walters 2005-01-31 14:08:57 EST
Are there any log messages relating to it?
Comment 3 Thomas J. Baker 2005-01-31 14:44:29 EST
Created attachment 110454 [details]
partial /var/log/messsages showing nm messages

nm is logging all the correct things but the actual /etc/resolv.conf file lacks
the search directive:

continuity> cat /etc/resolv.conf
; generated by NetworkManager, do not edit!
nameserver 132.177.241.111
nameserver 132.177.241.100
nameserver 132.177.241.27
continuity>
Comment 4 Colin Walters 2005-01-31 20:24:34 EST
Hi,

I'm an idiot.  Dan, can you review and apply this patch?
Comment 5 Colin Walters 2005-01-31 20:25:32 EST
Created attachment 110474 [details]
really use searches

Note this patch includes a fix to use the correct syntax for multi-domain
searches.
Comment 6 Dan Williams 2005-02-01 21:38:18 EST
Colin, I assume this is for resolv.conf, right?

Isn't the format of resolv.conf "search domain1 domain2"?  It looks
like this patch would do "search domain1 search domain2".  We should
probably move the g_append_str ("search ") to
compute_domain_searches() instead...

Is that a correct read of the situation?

Dan
Comment 7 Dan Williams 2005-02-01 21:46:06 EST
Created attachment 110538 [details]
Do searches v2

Colin, does this look better?  Also in rewrite_resolv_conf() it looks like the
"searches" line would get appended to the file twice, once by the first
fprintf() right under compute_domain_searches() and then next inside the
#ifndef NM_NO_NAMED...	If that's correct, then the patch fixes that too.
Comment 8 Colin Walters 2005-02-02 09:53:16 EST
Dan, looks good to me.
Comment 9 Dan Williams 2005-02-02 10:52:50 EST
committed to CVS
Comment 10 Thomas J. Baker 2005-02-02 16:48:27 EST
FWIW, I added the patch to the current SRPM of NM and all it does is
add a blank line to the resolv.conf file :( The patch appeared to
apply cleanly.
Comment 11 Dan Williams 2005-02-02 16:51:03 EST
Hmm, worksforme.  Can you post the output of your DHCP transaction as
reported by /var/log/messages?  I'm fairly sure that the only way that
you won't get a search domain is if the DHCP server doesn't give you one.

FWIW, current CVS has an updated version of this patch that fixes a
few things.

Dan
Comment 12 Thomas J. Baker 2005-02-02 17:08:50 EST
here is the relevant log:

Feb  2 16:46:08 continuity NetworkManager: debug_dump_dhcp_options: 11
options received:
Feb  2 16:46:08 continuity NetworkManager: i=1  (subnetMask)  len=4  
option = 255.255.255.0
Feb  2 16:46:08 continuity NetworkManager: i=3  (routersOnSubnet) 
len=4   option = 10.0.1.254
Feb  2 16:46:08 continuity NetworkManager: i=6  (dns)  len=12  option
= 10.0.1.1
Feb  2 16:46:08 continuity NetworkManager: i=6  (dns)  len=12  option
= 10.0.1.254
Feb  2 16:46:08 continuity NetworkManager: i=6  (dns)  len=12  option
= 132.177.241.100
Feb  2 16:46:08 continuity NetworkManager: i=12 (hostName)  len=39 
option = "continuity.bakerconsulting.com_wireless"
Feb  2 16:46:08 continuity NetworkManager: i=15 (domainName)  len=19 
option = "bakerconsulting.com"
Feb  2 16:46:08 continuity NetworkManager: i=28 (broadcastAddr)  len=4
  option = 10.0.1.255
Feb  2 16:46:08 continuity NetworkManager: i=51 (dhcpMessageType) 
len=4   option = 86400
Feb  2 16:46:08 continuity NetworkManager: i=53 (dhcpParamRequest) 
len=1   option = 5
Feb  2 16:46:08 continuity NetworkManager: i=54 (dhcpMsg)  len=4  
option = 127.0.0.1
Feb  2 16:46:08 continuity NetworkManager: i=58 (dhcpClassIdentifier)
 len=4   option = 0
Feb  2 16:46:08 continuity NetworkManager: i=59 (dhcpClientIdentifier)
 len=4   option = 0
Feb  2 16:46:08 continuity NetworkManager: dhcp_msg->yiaddr  = 10.0.1.150
Feb  2 16:46:08 continuity NetworkManager: dhcp_msg->siaddr  = 127.0.0.1
Feb  2 16:46:08 continuity NetworkManager: dhcp_msg->giaddr  = 0.0.0.0
Feb  2 16:46:08 continuity NetworkManager: dhcp_msg->sname   = ""
Feb  2 16:46:08 continuity NetworkManager: Server Hardware Address   =
00.40.05.A2.DD.68
Feb  2 16:46:08 continuity NetworkManager: DHCP_ACK received from 
(127.0.0.1)
Feb  2 16:46:08 continuity NetworkManager: Your IP address = 10.0.1.150
Feb  2 16:46:08 continuity NetworkManager: : Adding nameserver: 10.0.1.1
Feb  2 16:46:08 continuity NetworkManager: : Adding nameserver: 10.0.1.254
Feb  2 16:46:08 continuity NetworkManager: : Adding nameserver:
132.177.241.100
Feb  2 16:46:08 continuity NetworkManager: : Adding domain search:
bakerconsulting.com
Feb  2 16:46:08 continuity NetworkManager: Restarting mDNSResponder.
Feb  2 16:46:08 continuity NetworkManager:
nm_state_modification_monitor() activated device eth1

How soon to an FC3 release of current CVS? 
Comment 13 Dan Williams 2005-02-02 17:42:12 EST
Hopefully by tomorrow in FC3-updates-testing?
Comment 14 Thomas J. Baker 2005-02-02 19:24:06 EST
Cool, thanks. I'll look for it then.
Comment 15 Thomas J. Baker 2005-02-16 08:38:23 EST
So how about that FC3 update? The one from rawhide that just came out
can't be installed on FC3 without half of rawhide with it. I've built
one to tide my over but I'm using NM on quite a few laptops in our
environment so it would be good to have an update from the normal feeds.
Comment 16 Thomas J. Baker 2005-04-12 10:49:43 EDT
Fixed.

Note You need to log in before you can comment on or make changes to this bug.