summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-08-10 19:55:36 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-08-10 19:55:36 +0000
commite125f32471c3aa144e243a52ae60673e4d91d3d6 (patch)
tree57613f36c0b4cf2c0764d8ea370e8d8b62e34926
parent1efc51a173a0a931070ec208ad341b5520ae34c9 (diff)
print checksum differences on -vv; ok otto@
-rw-r--r--usr.sbin/tcpdump/print-ip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-ip.c b/usr.sbin/tcpdump/print-ip.c
index 5382e2729b6..f241efc0a4a 100644
--- a/usr.sbin/tcpdump/print-ip.c
+++ b/usr.sbin/tcpdump/print-ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ip.c,v 1.26 2004/05/08 01:01:35 mcbride Exp $ */
+/* $OpenBSD: print-ip.c,v 1.27 2004/08/10 19:55:35 markus Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ip.c,v 1.26 2004/05/08 01:01:35 mcbride Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ip.c,v 1.27 2004/08/10 19:55:35 markus Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -639,6 +639,8 @@ ip_print(register const u_char *bp, register u_int length)
if (sum != 0) {
(void)printf("%sbad cksum %x!", sep,
ntohs(ip->ip_sum));
+ if (vflag > 1)
+ (void)printf(" differs by %x", htons(sum));
sep = ", ";
}
}