This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 450042 - search line in /etc/resolv.conf contains '\032'
search line in /etc/resolv.conf contains '\032'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
9
All Linux
low Severity high
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Reopened
: 458555 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-04 17:59 EDT by Levente Farkas
Modified: 2008-10-20 17:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-20 17:22:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Levente Farkas 2008-06-04 17:59:06 EDT
Description of problem:
if i set in /etc/dhclient.conf:
supersede domain-search "lfarkas.org. int.bppiac.hu.";
then in /etc/resolv.conf:
search lfarkas.org.\032int.bppiac.hu.
and of course these \032 are not working.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Levente Farkas 2008-06-09 07:47:59 EDT
same problem here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399084
Comment 2 David Cantrell 2008-06-21 15:13:32 EDT
Patch applied to package CVS, will be in the next build in rawhide (NVR will be dhcp-4.0.0-16.fc10).  
Thanks.
Comment 3 Levente Farkas 2008-06-21 15:58:48 EDT
wouldn't it be useful to create a f9 update for this?
anyway this is still not in koji:-(
Comment 4 David Cantrell 2008-06-21 16:00:40 EDT
I haven't built yet because I'm working on some other patches for this build.

I can prepare an update for F-9, sure.
Comment 5 David Cantrell 2008-06-24 09:39:48 EDT
An update for this problem has been pushed in to the F-9 Testing Updates collection.
Comment 6 Levente Farkas 2008-06-24 10:24:07 EDT
may be tomorrow, since i can't see in update/testing not in koji today:-(
Comment 7 Levente Farkas 2008-07-01 14:36:39 EDT
dhclient-4.0.0-16.fc9.i386 do not solve the problem:-(
Comment 8 Levente Farkas 2008-07-10 13:34:58 EDT
any progress?
Comment 9 David Cantrell 2008-07-14 16:05:02 EDT
(In reply to comment #8)
> any progress?

Sorry, was on vacation for the past 10 days.  Back to work now and will get back on this problem asap.

Thanks.
Comment 10 Levente Farkas 2008-07-25 07:40:04 EDT
any progress? it's very annoying on my laptop i always have to cp the old
resolv.conf:-(
Comment 11 David Cantrell 2008-08-01 16:57:21 EDT
Update coming shortly to address this problem.  It will appear in the F-9 testing updates repository.
Comment 12 Fedora Update System 2008-08-01 18:44:35 EDT
dhcp-4.0.0-17.fc9 has been submitted as an update for Fedora 9
Comment 13 Levente Farkas 2008-08-03 15:08:45 EDT
i already try it yesterday (just because the bugzilla update not able to report it) so it's still not working!
is it so hard to fix this simple bug?
Comment 14 David Cantrell 2008-08-04 16:29:09 EDT
I originally looked at the Debian bug you pointed me to, which was http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399084

But if you read that bug, it does not match your description of the problem.  However, on that page, Debian bug #461056 does describe your problem, so I went to that:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461056

Message #5 on 461056 describes the problem and that's how I patched our dhclient-script.  Here's the block from make_resolv_conf() in our dhclient-script:

        if [ -z "$SEARCH" ]; then
            if [ -n "$new_domain_search" ]; then
                echo "search ${new_domain_search//\\032/ }" >> $rscf
            else
                if [ -n "$new_domain_name" ]; then
                    echo "search ${new_domain_name//\\032/ }" >> $rscf
                fi
            fi
        else
            echo "search $SEARCH" >> $rscf
        fi

As the Debian bug indicates, the required change is to make sure you have //\\032 rather than /\\032 in the script.

This change first appeared in dhcp-4.0.0-16.fc9 and is currently available in the updates-testing repository for F-9.  Can you check and see which package you have installed for dhclient?

If it's correct, remember the Debian bug also notes the syntax of the supersede domain-search parameter in the dhclient.conf file:

        supersede domain-search "lfarkas.org.", "int.bppiac.hu.";
Comment 15 Levente Farkas 2008-08-05 06:10:19 EDT
as i wrote earlier in #7 dhclient-4.0.0-16.fc9.i386 don't working, now i download dhclient-4.0.0-17.fc9.i386.rpm from:
http://koji.fedoraproject.org/koji/buildinfo?buildID=58325
(since it was not in fedora updates at that time) and it's still not working ie. i've got such resolv.conf:
search lfarkas.org.\032int.bppiac.hu.
actually i can check only at home the supersede format, but according to man dhclient.conf the format is the same as for domain-name and at the end the example said:
supersede domain-name "fugue.com rc.vix.com home.vix.com";
but anyway i'll try it ad the evning.
Comment 16 David Cantrell 2008-08-06 15:39:28 EDT
Investigating the bug further, I found that common/tables.c was not handling the /etc/dhclient.conf file correctly.  I patched that and with a few other changes to /sbin/dhclient-script, I have verified that it works for me here.

The new build will be dhcp-4.0.0-18.fc9

NOTE: Make sure you do not have a SEARCH variable defined in /etc/sysconfig/network-scripts/ifcfg-ethX for your interface.  That will override the /etc/dhclient.conf setting and any option handed back from the DHCP server.

On my system, my /etc/dhclient.conf file had the following line:

      supersede domain-search "one.com. two.com. three.com.";

Before the patch to dhclient-script and common/tables.c, I was getting this line in resolv.conf:

      search one.com.\032two.com.\032three.com.

With the dhcp-4.0.0-18.fc9 build, I get this line:

      search one.com. two.com. three.com.

Thank you for your patience.  An update will be available soon (waiting on the build to finish).
Comment 17 Fedora Update System 2008-08-06 15:58:07 EDT
dhcp-4.0.0-18.fc9 has been submitted as an update for Fedora 9
Comment 18 Levente Farkas 2008-08-06 18:32:18 EDT
i wouldn't like to test the old version just the latest, but still not working:-(

[root@sas ~]# rpm -qa|grep dhc|sort
dhclient-4.0.0-18.fc9.i386
dhcpv6-client-1.0.14-1.fc9.i386
libdhcp-1.99.8-1.fc9.i386
libdhcp4client-4.0.0-18.fc9.i386
libdhcp6client-1.0.14-1.fc9.i386
[root@sas ~]# cat /etc/dhclient-wlan0.conf 
supersede domain-name "lfarkas.org";
supersede domain-name-servers 192.168.0.2,192.168.0.1;
supersede domain-search "lfarkas.org. int.bppiac.hu. bppiac.hu. int.mkk.hu. mkk.hu. lenux.hu.";
[root@sas ~]# cat /etc/resolv.conf
# generated by NetworkManager, do not edit!

domain lfarkas.org

search lfarkas.org.\032int.bppiac.hu.\032bppiac.hu.\032int.mkk.hu.\032mkk.hu.\032lenux.hu.

nameserver 192.168.0.2
nameserver 192.168.0.1

[root@sas ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0 
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
TYPE=Wireless
DEVICE=wlan0
HWADDR=00:14:a5:2c:2e:8b
BOOTPROTO=dhcp
DHCP_HOSTNAME=
DOMAIN=
ONBOOT=no
USERCTL=yes
#IPV6INIT=no
PEERDNS=no
ESSID=
CHANNEL=
MODE=Managed
#RATE=54M
IPADDR=
NETMASK=
#NM_CONTROLLED=no
Comment 19 Levente Farkas 2008-08-06 18:34:42 EDT
and to be sure it's what is running:
root      3135  0.0  0.1   2516  1192 ?        S    00:26   0:00 /sbin/dhclient -d -sf /usr/libexec/nm-dhcp-client.action -pf /var/run/dhclient-wlan0.pid -lf /var/run/dhclient-wlan0.lease -cf /etc/dhclient-wlan0.conf wlan0
Comment 20 David Cantrell 2008-08-06 18:42:48 EDT
Disable NetworkManager and run dhclient by hand and see what /etc/resolv.conf looks like.
Comment 21 Levente Farkas 2008-08-07 16:52:28 EDT
nothing!
if i disable networkmanager just run ifup wlan0 then it's not called the right command line (i don't know who's fault) since the command line is the following in this case:
/sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-wlan0.leases -pf /var/run/dhclient-wlan0.pid wlan0
and of course resolv.conf is not generated:-(
Comment 22 David Cantrell 2008-08-07 17:02:15 EDT
Just run:

      dhclient wlan0

Nothing more.  Does it write out /etc/resolv.conf?
Comment 23 Levente Farkas 2008-08-07 17:14:25 EDT
nothing happend, no resolv.conf written and even if i able to run:
/sbin/dhclient -1 -q -cf /etc/dhclient-wlan0.conf -lf /var/lib/dhclient/dhclient-wlan0.leases -pf /var/run/dhclient-wlan0.pid wlan0
the resolv.conf is not generated! if i delete the file no new file generated!
Comment 24 David Cantrell 2008-08-07 17:19:08 EDT
Something else is wrong with your system then.  Because it's working for me on several systems now.

Is there anything in the debugging output of dhclient?  Run:

       dhclient -d -v wlan0
Comment 25 Levente Farkas 2008-08-07 17:30:50 EDT
[root@sas ~]# dhclient -d -v wlan0
Internet Systems Consortium DHCP Client 4.0.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:14:a5:2c:2e:8b
Sending on   LPF/wlan0/00:14:a5:2c:2e:8b
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 192.168.182.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.182.1
bound to 192.168.182.9 -- renewal in 244 seconds.

on another terminal:
[root@sas ~]# ps axww|grep dhclient
 6437 pts/0    S+     0:00 dhclient -d -v wlan0
 6735 ?        S<s    0:00 /sbin/dhclient -1 -q -cf /etc/dhclient-wlan0.conf -lf /var/lib/dhclient/dhclient-wlan0.leases -pf /var/run/dhclient-wlan0.pid wlan0
 6784 pts/1    S+     0:00 grep dhclient
[root@sas ~]# ifconfig 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:904 errors:0 dropped:0 overruns:0 frame:0
          TX packets:904 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:66048 (64.5 KiB)  TX bytes:66048 (64.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:14:A5:2C:2E:8B  
          inet addr:192.168.182.9  Bcast:192.168.182.255  Mask:255.255.255.0
          inet6 addr: fe80::214:a5ff:fe2c:2e8b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1360 (1.3 KiB)  TX bytes:6021 (5.8 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-14-A5-2C-2E-8B-F4-EF-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
Comment 26 David Cantrell 2008-08-07 17:35:50 EDT
(In reply to comment #25)
> on another terminal:
> [root@sas ~]# ps axww|grep dhclient
>  6437 pts/0    S+     0:00 dhclient -d -v wlan0
>  6735 ?        S<s    0:00 /sbin/dhclient -1 -q -cf /etc/dhclient-wlan0.conf
> -lf /var/lib/dhclient/dhclient-wlan0.leases -pf /var/run/dhclient-wlan0.pid
> wlan0
>  6784 pts/1    S+     0:00 grep dhclient

You can't have multiple dhclient instances running for the same interface!

Kill all existing dhclient instances:

    pkill dhclient
    pkill -KILL dhclient

Check:

    ps -ef | grep dhclient

You should see no dhclients running.

Now, with that, run:

    dhclient -d -v wlan0
Comment 27 Levente Farkas 2008-08-07 17:45:19 EDT
:-) i like when i seems to stupid, so:
[root@sas ~]# ps ax|grep dhc; cat /etc/resolv.conf; dhclient -d -v wlan0
 8455 pts/0    R+     0:00 grep dhc
cat: /etc/resolv.conf: No such file or directory
Internet Systems Consortium DHCP Client 4.0.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:14:a5:2c:2e:8b
Sending on   LPF/wlan0/00:14:a5:2c:2e:8b
Sending on   Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.182.1
bound to 192.168.182.9 -- renewal in 285 seconds.

on another terminal:
[root@sas ~]# ps ax|grep dhc; cat /etc/resolv.conf
 8457 pts/0    S+     0:00 dhclient -d -v wlan0
 8531 pts/1    S+     0:00 grep dhc
cat: /etc/resolv.conf: No such file or directory

anyway the second dhclient are also started by the system and not me!
but as it sees it still not working.
Comment 28 David Cantrell 2008-08-07 21:20:28 EDT
Anything in /var/log/messages?  What does /etc/dhclient.conf contain?  Is there also an /etc/dhclient-wlan0.conf file?  If so, what does it contain?  What does /etc/sysconfig/network-scripts/ifcfg-wlan0 contain?
Comment 29 Levente Farkas 2008-08-08 06:52:36 EDT
if your read my comment #18 then it's include everything. so
- this's my home laptop so i can't look into the messages right now
- there is no /etc/dhclient.conf just /etc/dhclient-wlan0.conf (see #18)
- ifcfg-wlan0 see #18
Comment 30 Fedora Update System 2008-08-12 14:27:14 EDT
dhcp-4.0.0-18.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dhcp'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-7234
Comment 31 Levente Farkas 2008-08-13 04:51:35 EDT
as i wrote in #18 already test it. everything after #18 is tested with version 4.0.0.18.
Comment 32 Fedora Update System 2008-09-16 19:25:48 EDT
dhcp-4.0.0-18.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 33 Levente Farkas 2008-09-27 11:16:36 EDT
as i wrote in #17 and after 4.0.0-18 is NOT working and the same problem exists!
Comment 34 David Cantrell 2008-09-27 18:45:47 EDT
From comment #18, your ifcfg-wlan0 contains PEERDNS=no.  Remove that line.  If PEERDNS=no in the ifcfg file, dhclient-script will not touch /etc/resolv.conf (either modifying or creating it).
Comment 35 Levente Farkas 2008-10-04 04:28:56 EDT
NOOOO! as i wrote even if i set PEERDNS=yes /etc/resolv.conf
 still contain \032.
anyway if i set PEERDNS=no then of course the /etc/resolv.conf won't change but i can't set static /etc/resolv.conf for all of my wireless access ponits:-(
please someone test it at least once before said it's fixed!
Comment 36 Will Woods 2008-10-10 12:12:27 EDT
You've got it misconfigured. Check the dhcp-options man page, specifically the section on "domain-list":

   The domain-list data type specifies a list of domain names, enclosed in
   double quotes and separated by commas ("example.com", "foo.example.com").

WRONG: supersede domain-search "lfarkas.org. int.bppiac.hu.";
RIGHT: supersede domain-search "lfarkas.org.", "int.bppiac.hu.";

See also these comments from Debian's bug system:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492500#10
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461056#42

Tested and confirmed - this works as described, *if* you use the correct syntax.
Comment 37 Levente Farkas 2008-10-20 15:25:14 EDT
ok it's may be not dhcp's fault just NetworkManager's #458555 but still not working:-(
Comment 38 Will Woods 2008-10-20 16:13:19 EDT
*** Bug 458555 has been marked as a duplicate of this bug. ***
Comment 39 Levente Farkas 2008-10-20 17:06:34 EDT
ok since i don't know which package's bug is it and you mark them as duplicate i reopen both.
the simple facts, that interface specific conf files are less usable:
----------------------------------------------
[root@sas ~]# cat /etc/dhclient-wlan0.conf 
supersede domain-name "lfarkas.org", "int.bppiac.hu", "bppiac.hu", "int.mkk.hu", "mkk.hu", "lenux.hu";
supersede domain-name-servers 192.168.0.2, 192.168.0.1, 192.168.182.1;
[root@sas ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search key.chillispot.org
nameserver 192.168.253.1
nameserver 192.168.253.1
[root@sas ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0 
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
TYPE=Wireless
DEVICE=wlan0
HWADDR=00:14:a5:2c:2e:8b
BOOTPROTO=dhcp
DHCP_HOSTNAME=
DOMAIN=
ONBOOT=yes
USERCTL=yes
#IPV6INIT=no
PEERDNS=yes
ESSID=
CHANNEL=
MODE=Managed
#RATE=54M
IPADDR=
NETMASK=
#NM_CONTROLLED=no
[root@sas ~]# ps axufww|grep dhclient|grep -v grep
root     10700  0.0  0.0   2516   608 ?        Ss   22:53   0:00 /sbin/dhclient -1 -q -cf /etc/dhclient-wlan0.conf -lf /var/lib/dhclient/dhclient-wlan0.leases -pf /var/run/dhclient-wlan0.pid wlan0
[root@sas ~]# rpm -qi dhclient
Name        : dhclient                     Relocations: (not relocatable)
Version     : 4.0.0                             Vendor: Fedora Project
Release     : 18.fc9                        Build Date: Wed 06 Aug 2008 09:44:44 PM CEST
Install Date: Wed 06 Aug 2008 10:49:44 PM CEST      Build Host: x86-2
Group       : System Environment/Base       Source RPM: dhcp-4.0.0-18.fc9.src.rpm
Size        : 552007                           License: ISC
Signature   : (none)
Packager    : Fedora Project
URL         : http://isc.org/products/DHCP/
Summary     : Provides the dhclient ISC DHCP client daemon and dhclient-script
Description :
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
individual devices on an IP network to get their own network
configuration information (IP address, subnetmask, broadcast address,
etc.) from a DHCP server. The overall purpose of DHCP is to make it
easier to administer a large network.

To use DHCP on your network, install a DHCP service (or relay agent),
and on clients run a DHCP client daemon.  The dhclient package
provides the ISC DHCP client daemon.
----------------------------------------------
what else should i've to show you?
so here is the messages log:
Oct 20 23:01:14 sas dhclient: /etc/dhclient-wlan0.conf line 1: semicolon expected.
Oct 20 23:01:14 sas dhclient: supersede domain-name "lfarkas.org",
Oct 20 23:01:14 sas dhclient:                                    ^
Oct 20 23:01:14 sas dhclient: /etc/dhclient-wlan0.conf line 1: expecting a statement.
Oct 20 23:01:14 sas dhclient: supersede domain-name "lfarkas.org", "int.bppiac.hu", "bppiac.hu", "int.mkk.hu",
Oct 20 23:01:14 sas dhclient: /etc/dhclient-wlan0.conf line 2: semicolon expected.
Oct 20 23:01:14 sas dhclient: 
Oct 20 23:01:14 sas dhclient: ^
Oct 20 23:01:15 sas kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Oct 20 23:01:16 sas dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Oct 20 23:01:16 sas dhclient: DHCPACK from 192.168.182.1
Oct 20 23:01:16 sas NET[11509]: /sbin/dhclient-script : updated /etc/resolv.conf
Oct 20 23:01:16 sas dhclient: bound to 192.168.182.16 -- renewal in 256 seconds.
----------------------------------------------
are you _absolutely_ sure about this syntax????
Comment 40 Will Woods 2008-10-20 17:22:08 EDT
Yes. You've got the syntax wrong again. Read the log messages:

> Oct 20 23:01:14 sas dhclient: /etc/dhclient-wlan0.conf line 1: semicolon expected.
> Oct 20 23:01:14 sas dhclient: supersede domain-name "lfarkas.org",

So that should be:
supersede domain-name "lfarkas.org";
The lines should end with a semicolon, not a comma.

Futhermore, that config line doesn't even appear in your earlier output: 

>   [root@sas ~]# cat /etc/dhclient-wlan0.conf 
> supersede domain-name "lfarkas.org", "int.bppiac.hu", "bppiac.hu", "int.mkk.hu", "mkk.hu", "lenux.hu";
> supersede domain-name-servers 192.168.0.2, 192.168.0.1, 192.168.182.1;

So those log messages don't match the config file you showed us.

You are creating broken config files. That is not a bug. And it's not the original bug reported here either.

Do not reopen this bug unless you can cause "\032" to appear in your resolv.conf with a *valid* config file.
Comment 41 Will Woods 2008-10-20 17:38:03 EDT
*** Bug 458555 has been marked as a duplicate of this bug. ***

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