From 5917e7d165d4a66d724631c196cf307485769821 Mon Sep 17 00:00:00 2001 From: Sergey Temerkhanov Date: Wed, 8 Apr 2015 01:41:22 -0500 Subject: 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 Signed-off-by: Sergey Temerkhanov Signed-off-by: Joe Hershberger Acked-by: Simon Glass --- net/bootp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/bootp.h') diff --git a/net/bootp.h b/net/bootp.h index efc2100a4b..1a5928671a 100644 --- a/net/bootp.h +++ b/net/bootp.h @@ -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; -- cgit v1.2.1