X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/846ce366e98d35f10c749a291c553e136cb53487..2bb115bda1b3a404f9e4535d69b83e893d210bd6:/print-ip.c diff --git a/print-ip.c b/print-ip.c index 6f71dae7..b05088d3 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.145 2004-12-27 22:30:54 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.147 2005-01-21 08:02:06 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -399,8 +399,19 @@ ip_print(register const u_char *bp, register u_int length) (void)printf("truncated-ip - %u bytes missing! ", len - length); if (len < hlen) { - (void)printf("bad-len %u", len); - return; +#ifdef GUESS_TSO + if (len) { + (void)printf("bad-len %u", len); + return; + } + else { + /* we guess that it is a TSO send */ + len = length; + } +#else + (void)printf("bad-len %u", len); + return; +#endif /* GUESS_TSO */ } /* @@ -558,7 +569,7 @@ again: break; case IPPROTO_EGP: - egp_print(cp); + egp_print(cp, len); break; case IPPROTO_OSPF: