udhcpc doesn't set hostname in discover packet

Bug #357518 reported by Tom Metro
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
udhcp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When invoking udhcpc (0.9.8cvs20050303-2 on Ubuntu 8.04) via /etc/network/interfaces, it appears as if it does not send the host name in the discover packet, as occurs with dhcp3-client and dhcpcd.

I haven't confirmed this with a packet sniffer, but my DHCP server behaved as if this was the case (it assigned a dynamic IP address rather than matching a rule to assign a static address based on the supplied host name). Modifying /etc/network/interfaces to include a hostname argument appeared to resolve the problem.

(I ran across this while developing a work around for Bug #351378.)

Revision history for this message
MatthiasH (m-launchpad-heidbrink) wrote :

I had the same problem, I believe: udhcpc did not set the host name in the DHCP server.

When examining the problem, I learned that this is a configuration issue:
Adding the option "hostname $(hostname)" to the configuration of the respective interface in /etc/network/interfaces and reinitializing the interface (ifdown/ifup) solved the problem.

The "hostname" entry is explained in the man page for interfaces, the "$(hostname)" was just a guess (it's not explained in that man page) and worked.

However, I'd prefer this to be enabled by default as long as this can't cause other problems.

Revision history for this message
Tom Metro (tmetro+ubuntu) wrote : Re: [Bug 357518] Re: udhcpc doesn't set hostname in doscover packet

MatthiasH wrote:
> ...I learned that this is a configuration issue:
> Adding the option "hostname $(hostname)" to the configuration...

Right, it seems I noted that in my original report:
"Modifying /etc/network/interfaces to include a hostname argument
appeared to resolve the problem."

I believe the bug I was pointing out is that the behavior is
inconsistent with the other two DHCP client packages.

summary: - udhcpc doesn't set hostname in doscover packet
+ udhcpc doesn't set hostname in discover packet
Revision history for this message
MatthiasH (m-launchpad-heidbrink) wrote :

Hi Tom,

just didn't fully get what you meaned when I wrote this comment yesterday night.
At least the next guy to google for that problem will be able find a more complete workaround now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in udhcp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.