summaryrefslogtreecommitdiff
path: root/common/ethernet.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-11-11 16:10:59 +0000
committerTed Lemon <source@isc.org>1999-11-11 16:10:59 +0000
commit98c83345a13c3094c8d45ec935d379740f9758fc (patch)
tree32ef0a89199a0e50dc87e5344cf3ae0a4e275e8c /common/ethernet.c
parent3107c7f9bb8eeaa8055e59b0a22f8bc37d76fcc5 (diff)
downloadisc-dhcp-98c83345a13c3094c8d45ec935d379740f9758fc.tar.gz
Fix a struct size problem on Linux/ARM32.
Diffstat (limited to 'common/ethernet.c')
-rw-r--r--common/ethernet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/ethernet.c b/common/ethernet.c
index e7cbea2a..1a1162b7 100644
--- a/common/ethernet.c
+++ b/common/ethernet.c
@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
-"$Id: ethernet.c,v 1.2 1999/10/07 06:35:42 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ethernet.c,v 1.3 1999/11/11 16:10:57 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -59,8 +59,8 @@ void assemble_ethernet_header (interface, buf, bufix, to)
eh.ether_type = htons (ETHERTYPE_IP);
#endif
- memcpy (&buf [*bufix], &eh, sizeof eh);
- *bufix += sizeof eh;
+ memcpy (&buf [*bufix], &eh, ETHER_HEADER_SIZE);
+ *bufix += ETHER_HEADER_SIZE;
}
#endif /* PACKET_ASSEMBLY */
@@ -75,7 +75,7 @@ ssize_t decode_ethernet_header (interface, buf, bufix, from)
{
struct ether_header eh;
- memcpy (&eh, buf + bufix, sizeof eh);
+ memcpy (&eh, buf + bufix, ETHER_HEADER_SIZE);
#ifdef USERLAND_FILTER
if (ntohs (eh.ether_type) != ETHERTYPE_IP)