X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/740e55c20bb4b80dbd3e7d87a403bf7a8e6e58d5..f72fe0d0de6eb91663b005b7d061ecebb555d667:/print-ip.c?ds=inline diff --git a/print-ip.c b/print-ip.c index 62c70342..c24f5d52 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.101 2001-10-27 07:42:46 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.104 2002-05-29 09:47:04 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -264,8 +264,6 @@ ip_print(register const u_char *bp, register u_int length) #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; @@ -549,8 +547,9 @@ again: if ((u_char *)ip + hlen <= snapend) { sum = in_cksum((const u_short *)ip, hlen, 0); if (sum != 0) { - (void)printf("%sbad cksum %x!", sep, - ntohs(ip->ip_sum)); + (void)printf("%sbad cksum %x (->%x)!", sep, + ntohs(ip->ip_sum), + ntohs(ip->ip_sum)-sum); sep = ", "; } }