Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dhcp] Ensure message type is first DHCP option
Apparently, the DHCP relay logic on a Nortel 470-48T layer 2 switch
cares about the order of DHCP options.  Specifically, it requires
that the DHCP message type option be the first option present in the
DHCP packet.  We achieve this by having this option appear first in
our dhcp_request_options_data array, which pre-populates DHCP
requests.

Signed-off-by: Marty Connor <mdc@etherboot.org>
  • Loading branch information
Shao Miller authored and Marty Connor committed Jan 14, 2010
1 parent 5736f5e commit 9de525c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/net/udp/dhcp.c
Expand Up @@ -71,6 +71,7 @@ static const uint8_t dhcp_op[] = {

/** Raw option data for options common to all DHCP requests */
static uint8_t dhcp_request_options_data[] = {
DHCP_MESSAGE_TYPE, DHCP_BYTE ( 0 ),
DHCP_MAX_MESSAGE_SIZE,
DHCP_WORD ( ETH_MAX_MTU - 20 /* IP header */ - 8 /* UDP header */ ),
DHCP_CLIENT_ARCHITECTURE, DHCP_WORD ( 0 ),
Expand Down

0 comments on commit 9de525c

Please sign in to comment.