Browse Source

[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>
tags/v1.0.0-rc1
Shao Miller 15 years ago
parent
commit
9de525c34c
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/net/udp/dhcp.c

+ 1
- 0
src/net/udp/dhcp.c View File

71
 
71
 
72
 /** Raw option data for options common to all DHCP requests */
72
 /** Raw option data for options common to all DHCP requests */
73
 static uint8_t dhcp_request_options_data[] = {
73
 static uint8_t dhcp_request_options_data[] = {
74
+	DHCP_MESSAGE_TYPE, DHCP_BYTE ( 0 ),
74
 	DHCP_MAX_MESSAGE_SIZE,
75
 	DHCP_MAX_MESSAGE_SIZE,
75
 	DHCP_WORD ( ETH_MAX_MTU - 20 /* IP header */ - 8 /* UDP header */ ),
76
 	DHCP_WORD ( ETH_MAX_MTU - 20 /* IP header */ - 8 /* UDP header */ ),
76
 	DHCP_CLIENT_ARCHITECTURE, DHCP_WORD ( 0 ),
77
 	DHCP_CLIENT_ARCHITECTURE, DHCP_WORD ( 0 ),

Loading…
Cancel
Save