diff options
author | itojun <itojun> | 2000-11-17 19:08:14 +0000 |
---|---|---|
committer | itojun <itojun> | 2000-11-17 19:08:14 +0000 |
commit | 8f002a3cccc30aca8feb4dab323d3ebba68d95cc (patch) | |
tree | c5fd4f5ce7bae2b5f9b58566835d9ea614c1b7a4 /print-tcp.c | |
parent | c237b80b771b8dbdc7a9996c52e6822c590ad68f (diff) | |
download | tcpdump-8f002a3cccc30aca8feb4dab323d3ebba68d95cc.tar.gz |
do not try to compute tcp/udp checksum for fragmented datagram.
from: jinmei@kame.net
Diffstat (limited to 'print-tcp.c')
-rw-r--r-- | print-tcp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/print-tcp.c b/print-tcp.c index 2c50ae84..852300ce 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.79 2000-10-07 05:53:14 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.80 2000-11-17 19:08:16 itojun Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -229,7 +229,7 @@ static int tcp6_cksum(const struct ip6_hdr *ip6, const struct tcphdr *tp, void tcp_print(register const u_char *bp, register u_int length, - register const u_char *bp2) + register const u_char *bp2, int fragmented) { register const struct tcphdr *tp; register const struct ip *ip; @@ -444,7 +444,7 @@ tcp_print(register const u_char *bp, register u_int length, return; } - if (IP_V(ip) == 4 && vflag) { + if (IP_V(ip) == 4 && vflag && !fragmented) { int sum; if (TTEST2(tp->th_sport, length)) { sum = tcp_cksum(ip, tp, length); @@ -455,7 +455,7 @@ tcp_print(register const u_char *bp, register u_int length, } } #ifdef INET6 - if (IP_V(ip) == 6 && ip6->ip6_plen && vflag) { + if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) { int sum; if (TTEST2(tp->th_sport, length)) { sum = tcp6_cksum(ip6, tp, length); |