Re: dhcpcd error on startup - "": interface not found or invalid
Roy Marples
Sat Jun 15 15:44:34 2013
Hi
On 14/06/2013 0:13, Jyothsna Rajan wrote:
i am using version 5.2.12 of dhcpcd and run into this error every
time dhcpcd is restarted. Here is dump of the first few error
messages
right after start:
Apr 12 22:13:16 hgfedcba dhcpcd[3526]: version 5.2.12 starting
Apr 12 22:13:16 hgfedcba dhcpcd[3526]: "": interface not found or
invalid
The command being executed ( from ps aux | grep dhcpcd) is:
/sbin/dhcpcd -q --reboot 0 --hostname "" -t 16 eth0
That's a bug which looks fixed in the latest release.
I use the hostname option so that I can send a hostname along with
the DHCP request. I did a wireshark capture and found that the
hostname is being sent in the DHCP request , but it is not an empty
string as I would expect, but a default hostname that I have
specified
in /etc/rc.conf.
If I remove the empty string after the hostname, i.e. execute
/sbin/dhcpcd -q --reboot 0 --hostname -t 16 eth0
the error message goes away. I do not observe any noticeable change
in system behaviour.
If I add a hostname string, i.e. execute
/sbin/dhcpcd -q --reboot 0 --hostname "AAAABC" -t 16 eth0
I get the error message
Apr 12 00:41:58 TesiraServer91101311 dhcpcd[25095]: AAAABC: interface
not found or invalid
If I completely remove the hostname option, then DHCP request does
not include a hostname.
From the error message text, it appears as if the string specified
after hostname is being interpreted as the interface name. Per the
spec, hostname can be an empty string. What am I doing wrong here?
The actual spec in question from RFC2132
3.14. Host Name Option
This option specifies the name of the client. The name may or may
not be qualified with the local domain name (see section 3.17 for
the
preferred way to retrieve the domain name). See RFC 1035 for
character set restrictions.
The code for this option is 12, and its minimum length is 1.
Minimum lengh of 1 means the hostname cannot be empty.
When the hostname is invalid dhcpcd sends the current hostname, unless
that is
also invalid (or localhost for example) and then dhcpcd wont sent a
hostname at all.
Thanks
Roy
Archive administrator: postmaster@marples.name