#1405 assigned defect

dhcp request includes host name option even if hostname is zero length.

Reported by: Tim Cussins Owned by: Joel Sherrill
Priority: normal Milestone: 4.9.5
Component: network/legacy Version: 4.9
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Gedare)

DHCP requests add the hostname option in dhcp_request_req() - this is cool, except that the dhcp spec requires that this option has a length >= 1 char.

http://www.networksorcery.com/enp/rfc/rfc2132.txt

3.14. Host Name Option

<snip>
The code for this option is 12, and its minimum length is 1.
</snip>

At present, the hostname is added regardless. This appears to trigger a bug in a specific Netgear router that causes it's dhcp process to lock up.

Attachments (3)

dhcp_hostname_option.patch (971 bytes) - added by Tim Cussins on Apr 24, 2009 at 12:02:19 PM.
Proposed patch to test hostname length before adding as an option.
0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.patch (2.3 KB) - added by Aun-Ali Zaidi on Dec 28, 2015 at 3:08:38 AM.
0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2.patch (2.2 KB) - added by Aun-Ali Zaidi on Jan 7, 2016 at 1:38:21 AM.

Download all attachments as: .zip

Change History (9)

Changed on Apr 24, 2009 at 12:02:19 PM by Tim Cussins

Attachment: dhcp_hostname_option.patch added

Proposed patch to test hostname length before adding as an option.

comment:1 Changed on Apr 24, 2009 at 12:02:19 PM by Tim Cussins

DHCP requests add the hostname option in dhcp_request_req() - this is cool, except that the dhcp spec requires that this option has a length >= 1 char.

http://www.networksorcery.com/enp/rfc/rfc2132.txt

3.14. Host Name Option

<snip>
The code for this option is 12, and its minimum length is 1.
</snip>

At present, the hostname is added regardless. This appears to trigger a bug in a specific Netgear router that causes it's dhcp process to lock up.

comment:2 Changed on Nov 22, 2014 at 1:35:39 PM by Gedare

Description: modified (diff)
Milestone: 4.104.9.5

comment:3 Changed on Nov 22, 2014 at 2:25:16 PM by Gedare

Owner: changed from Eric Norum to Joel Sherrill
Status: newassigned

comment:4 Changed on Dec 25, 2015 at 4:33:40 PM by Aun-Ali Zaidi

Last edited on Dec 25, 2015 at 4:43:50 PM by Aun-Ali Zaidi (previous) (diff)

comment:5 Changed on Dec 28, 2015 at 3:08:54 AM by Aun-Ali Zaidi

I have attached an updated patch

comment:6 Changed on Jan 7, 2016 at 1:39:40 AM by Aun-Ali Zaidi

Updated patch with suggestions from devel mailing list.

Note: See TracTickets for help on using tickets.