diff options
author | Michael Brown | 2008-02-27 17:55:46 +0100 |
---|---|---|
committer | Michael Brown | 2008-02-27 17:55:46 +0100 |
commit | 844828cb157491121d6110d903cc84a9e4a75d02 (patch) | |
tree | 04ab562aa5fa9126e446448eed2aac60f6eca295 /src/net/udp | |
parent | [Infiniband] Add preliminary support for multi-port devices. (diff) | |
download | ipxe-844828cb157491121d6110d903cc84a9e4a75d02.tar.gz ipxe-844828cb157491121d6110d903cc84a9e4a75d02.tar.xz ipxe-844828cb157491121d6110d903cc84a9e4a75d02.zip |
[DHCP] Fix RFC4390 client identifier constructions.
RFC 4390 provides for the DHCP client identifier to contain the link-layer
hardware type and MAC address when the MAC address exceeds 16 bytes.
However, the hardware type field is only 8 bits; we were assuming 16 bits.
Diffstat (limited to 'src/net/udp')
-rw-r--r-- | src/net/udp/dhcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index 2521f9ac..081fa841 100644 --- a/src/net/udp/dhcp.c +++ b/src/net/udp/dhcp.c @@ -610,7 +610,7 @@ int create_dhcp_request ( struct net_device *netdev, int msgtype, /* Add DHCP client identifier. Required for Infiniband, and * doesn't hurt other link layers. */ - client_id.ll_proto = netdev->ll_protocol->ll_proto; + client_id.ll_proto = ntohs ( netdev->ll_protocol->ll_proto ); ll_addr_len = netdev->ll_protocol->ll_addr_len; assert ( ll_addr_len <= sizeof ( client_id.ll_addr ) ); memcpy ( client_id.ll_addr, netdev->ll_addr, ll_addr_len ); |