diff options
author | guy <guy> | 2000-10-09 02:59:39 +0000 |
---|---|---|
committer | guy <guy> | 2000-10-09 02:59:39 +0000 |
commit | d16cf6488c6a3a8a4257311c80d5766ed8b7cdcb (patch) | |
tree | 03f2771bfafd5a0bf5fd51733960a515047840ac /print-pppoe.c | |
parent | 89cf9ca18a08c6281bf383f9f2bde7174488f8ab (diff) | |
download | tcpdump-d16cf6488c6a3a8a4257311c80d5766ed8b7cdcb.tar.gz |
Some compilers may pad structures to a length that's a multiple of 2 or
4 bytes, even though no member in the structure requires such an
alignment; don't use "sizeof (struct ether_header)" or "sizeof (struct
fddi_header)", explicitly #define the header length and use that
#defined value.
Diffstat (limited to 'print-pppoe.c')
-rw-r--r-- | print-pppoe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/print-pppoe.c b/print-pppoe.c index dd8ad24b..344d7903 100644 --- a/print-pppoe.c +++ b/print-pppoe.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = -"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.11 2000-10-06 04:23:13 guy Exp $ (LBL)"; +"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.12 2000-10-09 02:59:40 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -101,7 +101,7 @@ pppoe_print(register const u_char *bp, u_int length) const u_char *pppoe_packet, *pppoe_payload; eh = (struct ether_header *)packetp; - pppoe_packet = packetp+sizeof(struct ether_header); + pppoe_packet = packetp+ETHER_HDRLEN; if (pppoe_packet > snapend) { printf("[|pppoe]"); return; |