X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8da6377e8a9d773ff793fac7ad418df7aff7978a..ac3ce9a71275da6dea48c46fa8f5f54ff39610a0:/print-ip.c diff --git a/print-ip.c b/print-ip.c index aa20ce5f..6c823ec4 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.149.2.3 2005-10-07 10:49:28 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.149.2.4 2005-11-13 11:51:52 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -417,19 +417,21 @@ again: break; case IPPROTO_TCP: + /* pass on the MF bit plus the offset to detect fragments */ tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, - (ipds->off &~ 0x6000)); + ipds->off & (IP_MF|IP_OFFMASK)); break; case IPPROTO_UDP: + /* pass on the MF bit plus the offset to detect fragments */ udp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, - (ipds->off &~ 0x6000)); + ipds->off & (IP_MF|IP_OFFMASK)); break; case IPPROTO_ICMP: /* pass on the MF bit plus the offset to detect fragments */ icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, - (ipds->off &~ 0x6000)); + ipds->off & (IP_MF|IP_OFFMASK)); break; case IPPROTO_PIGP: