From 708c5060b9391eddb06701a175997220072262fe Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 15 Dec 2010 18:29:20 +0000 Subject: [dhcp] Use Ethernet-compatible chaddr, if possible For IPoIB, we currently use the hardware address (i.e. the eight-byte GUID) as the DHCP chaddr. This works, but some PXE servers (notably Altiris RDP) refuse to respond if the chaddr field is anything other than six bytes in length. We already have the notion of an Ethernet-compatible link-layer address, which is used in the iBFT (the design of which similarly fails to account for non-Ethernet link layers). Use this as the first preferred alternative to the actual link-layer address when constructing the DHCP chaddr field. Signed-off-by: Michael Brown --- src/include/ipxe/dhcp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/dhcp.h b/src/include/ipxe/dhcp.h index aac79b29f..54a85f661 100644 --- a/src/include/ipxe/dhcp.h +++ b/src/include/ipxe/dhcp.h @@ -620,8 +620,8 @@ struct dhcphdr { /** Setting block name used for BootServerDHCP responses */ #define PXEBS_SETTINGS_NAME "pxebs" -extern void * dhcp_chaddr ( struct net_device *netdev, uint8_t *hlen, - uint16_t *flags ); +extern unsigned int dhcp_chaddr ( struct net_device *netdev, void *chaddr, + uint16_t *flags ); extern int dhcp_create_packet ( struct dhcp_packet *dhcppkt, struct net_device *netdev, uint8_t msgtype, const void *options, size_t options_len, -- cgit v1.2.3-55-g7522