X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/63c668cbeb35cfecfb31bd35c55b2df7737d5c07..8f94d68a09e1103353cc7d1133d6dfdf7d5a920d:/print-ip.c diff --git a/print-ip.c b/print-ip.c index 91d73a98..f3471c50 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.123 2003-05-15 15:25:18 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.125 2003-05-21 08:39:57 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -369,7 +369,7 @@ ip_print(register const u_char *bp, register u_int length) u_int16_t sum, ip_sum; const char *sep = ""; - printf("IP%s ", (((*bp >> 4) & 0xf) == 4) ? "" : "4"); /* print version if != 4 */ + printf("IP%s ", (((*bp >> 4) & 0xf) == 4) ? "" : "%u", (*bp >> 4) & 0xf); /* print version if != 4 */ ip = (const struct ip *)bp; if ((u_char *)(ip + 1) > snapend) { @@ -519,7 +519,8 @@ again: break; case IPPROTO_ICMP: - icmp_print(cp, len, (const u_char *)ip); + /* pass on the MF bit plus the offset to detect fragments */ + icmp_print(cp, len, (const u_char *)ip, (off & 0x3fff)); break; #ifndef IPPROTO_IGRP