summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShao Miller2009-10-22 23:00:24 +0200
committerMarty Connor2010-01-14 17:13:10 +0100
commit9de525c34cad0252fe6ff823ee7e18240e472298 (patch)
tree2967ede491777bdfc63e7e8e903799517e49e1a4
parent[prefix] Add .hrom prefix for a ROM that loads high under PCI3 without PMM (diff)
downloadipxe-9de525c34cad0252fe6ff823ee7e18240e472298.tar.gz
ipxe-9de525c34cad0252fe6ff823ee7e18240e472298.tar.xz
ipxe-9de525c34cad0252fe6ff823ee7e18240e472298.zip
[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>
-rw-r--r--src/net/udp/dhcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 17e543ac..b0dd9529 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -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 ),