Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/dist/tcpdump Pull up revision 1.5 (via patch, requested...
details: https://anonhg.NetBSD.org/src/rev/9d98fe166bbc
branches: netbsd-1-6
changeset: 529703:9d98fe166bbc
user: he <he%NetBSD.org@localhost>
date: Sat Dec 07 22:46:26 2002 +0000
description:
Pull up revision 1.5 (via patch, requested by itojun):
Correct LBL_ALIGN behaviour, sync with tcpdump.org.
Enable LBL_ALIGN codepath to use byte-by-byte fetch
in extract.h. Fixes PR#18688 and PR#18398.
diffstat:
dist/tcpdump/print-ip.c | 30 ++----------------------------
1 files changed, 2 insertions(+), 28 deletions(-)
diffs (51 lines):
diff -r 5fcc75a59de9 -r 9d98fe166bbc dist/tcpdump/print-ip.c
--- a/dist/tcpdump/print-ip.c Sat Dec 07 22:46:07 2002 +0000
+++ b/dist/tcpdump/print-ip.c Sat Dec 07 22:46:26 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print-ip.c,v 1.3 2002/02/18 09:37:07 itojun Exp $ */
+/* $NetBSD: print-ip.c,v 1.3.2.1 2002/12/07 22:46:26 he Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
static const char rcsid[] =
"@(#) Header: /tcpdump/master/tcpdump/print-ip.c,v 1.100 2001/09/17 21:58:03 fenner Exp (LBL)";
#else
-__RCSID("$NetBSD: print-ip.c,v 1.3 2002/02/18 09:37:07 itojun Exp $");
+__RCSID("$NetBSD: print-ip.c,v 1.3.2.1 2002/12/07 22:46:26 he Exp $");
#endif
#endif
@@ -266,32 +266,6 @@
int advance;
ip = (const struct ip *)bp;
-#ifdef LBL_ALIGN
- /*
- * If the IP header is not aligned, copy into abuf.
- * This will never happen with BPF. It does happen raw packet
- * dumps from -r.
- */
- if ((long)ip & 3) {
- static u_char *abuf = NULL;
- static int didwarn = 0;
-
- if (abuf == NULL) {
- abuf = (u_char *)malloc(snaplen);
- if (abuf == NULL)
- error("ip_print: malloc");
- }
- memcpy((char *)abuf, (char *)ip, min(length, snaplen));
- snapend += abuf - (u_char *)ip;
- packetp = abuf;
- ip = (struct ip *)abuf;
- /* We really want libpcap to give us aligned packets */
- if (!didwarn) {
- warning("compensating for unaligned libpcap packets");
- ++didwarn;
- }
- }
-#endif
if ((u_char *)(ip + 1) > snapend) {
printf("[|ip]");
return;
Home |
Main Index |
Thread Index |
Old Index