1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

net: Fix incorrect DHCP/BOOTP packets on 64-bit systems

This commit fixes incorrect DHCP/BOOTP packet layout caused by
'ulong' type size difference on 64 and 32-bit architectures.
It also renames NetReadLong()/NetCopyLong() to
net_read_u32/net_copy_u32() accordingly.

Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Sergey Temerkhanov
2015-04-08 01:41:22 -05:00
committed by Simon Glass
parent bc0571fc10
commit 5917e7d165
3 changed files with 23 additions and 24 deletions

View File

@@ -38,7 +38,7 @@ struct bootp_hdr {
uchar bp_hlen; /* Hardware address length */
# define HWL_ETHER 6
uchar bp_hops; /* Hop count (gateway thing) */
ulong bp_id; /* Transaction ID */
u32 bp_id; /* Transaction ID */
ushort bp_secs; /* Seconds since boot */
ushort bp_spare1; /* Alignment */
struct in_addr bp_ciaddr; /* Client IP address */
@@ -59,7 +59,7 @@ struct bootp_hdr {
*/
/* bootp.c */
extern ulong bootp_id; /* ID of cur BOOTP request */
extern u32 bootp_id; /* ID of cur BOOTP request */
extern int bootp_try;