Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278717 - net-misc/dhcpcd-5.0.6: doesn't send host name in contradiction to manual
Summary: net-misc/dhcpcd-5.0.6: doesn't send host name in contradiction to manual
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 17:54 UTC by Martin von Gagern
Modified: 2009-07-26 17:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-07-22 17:54:24 UTC
The dhcpcd(8) man page reads:

     -h, --hostname hostname
             By default, dhcpcd sends the current hostname to the DHCP server
             so it can register in DNS.  You can use this option to specify
             the hostname sent, or an empty string to stop any hostname from
             being sent.

However, analyzing the issue using wireshark I found this to be untrue on my system: without a host name explicitely specified, no host name (option 12) at all gets sent to the dhcp server.

In my case, with an AVM Fritz!Box as DHCP server, this resulted in the machine not being resolvable via DNS and thus effectively unreachable on the local net. This in turn caused several other applications to fail. I therefore consider this a pretty serious issue in some scenarios, which should get fixed before dhcpcd 5 gets stabilized.

I don't know what intended behaviour is, whether a bug in the application made it behave in contradiction to the man page, or whether the observed behaviour is intended and the man page is too outdated to reflect this. I'll have a look at the sources soon to try and work this out. If the latter is the case, then either there should be some ewarn telling you to configure the host name, or the /lib/rc/net/dhcpcd.sh script should take care of passing the host name by default.
Comment 1 Martin von Gagern 2009-07-22 18:51:42 UTC
http://roy.marples.name/projects/dhcpcd/changeset/ed913a59775402a9ce66067858d7280fe4506176 states that not sending the hostname by default is intended behaviour, and that the default config does ensure a hostname gets sent nevertheless. My bad for not updating the config.

So it's the manuals which need to be updated. Probably makes this a trivial bug instead, but it should get addressed nevertheless.
Comment 2 lily 2009-07-23 13:28:26 UTC
no, I can not get IP address now. net-misc/dhcpcd-4.0.13 can get IP but net-misc/dhcpcd-5.0.6 can't.
I can only use static IP to get network now...
Comment 3 Martin von Gagern 2009-07-23 15:48:26 UTC
(In reply to comment #2)
> no, I can not get IP address now. net-misc/dhcpcd-4.0.13 can get IP but
> net-misc/dhcpcd-5.0.6 can't.

Have you updated your config files? If not, do so now, and see if it solves the issue.

If you still have this problem after your /etc/dhcpcd.conf contains a "hostname" line, and preferrably a "clientid" line as suggested by the ebuild, both keyowrds on a line by theirself without any additional value, then it's a different bug and should be filed separately.
Comment 4 Roy Marples 2009-07-25 18:01:17 UTC
(In reply to comment #1)
> http://roy.marples.name/projects/dhcpcd/changeset/ed913a59775402a9ce66067858d7280fe4506176
> states that not sending the hostname by default is intended behaviour, and that
> the default config does ensure a hostname gets sent nevertheless. My bad for
> not updating the config.
> 
> So it's the manuals which need to be updated. Probably makes this a trivial bug
> instead, but it should get addressed nevertheless.

Yes, you are correct
Fixed man pages + a few other minor improvements here.
http://roy.marples.name/projects/dhcpcd/changeset/84a95f7ffda2b047c7792ca33213d7910f2305f3