Red Hat Bugzilla – Bug 147662
NetworkManager should send a hostname in DHCP packets
Last modified: 2007-11-30 17:11:00 EST
Description of problem: There doesn't seem to be a way for
NetworkManager to send a hostname (message type 12) in DHCP packets.
(The normal network scripts allow this using DHCP_HOSTNAME in
/etc/sysconfig/network-scripts/ifcfg-*, but don't do so by default.)
This is useful for looking at DHCP tables (on the DHCP server) and
figuring out who has what address without having to use MAC addresses.
The obvious thing to send would be the output of gethostname(2).
Other operating systems and even some other Linux distros seem to do
something like this, judging from the DHCP client table I'm looking at.
NetworkManager's dhcp code is already capable of sending the field if
something fills it in (see fill_host_and_class_id in
dhcpcd/build_msg.c), except nothing ever fills in the host_name member
to something non-empty.
Version-Release number of selected component (if applicable):
How reproducible: every time
Steps to Reproduce:
1. Look at DHCP client table on router
Actual results: Shows garbage string or empty string associated with
my MAC address.
Expected results: Shows my hostname.
Fair enough, will see what I can do.
Fixed in CVS, and should be in Rawhide as well.