diff options
author | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2014-02-15 12:32:44 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2014-02-15 12:36:02 +0100 |
commit | c025e64b9ebbb64b29f3fa58dd88d901b9da9c9d (patch) | |
tree | 537e418fb01f5c701deeb33c1e5821023e4d1063 /print-ip.c | |
parent | fc3fcdee62a5820e60a28a6ed75910b207272d03 (diff) | |
download | tcpdump-c025e64b9ebbb64b29f3fa58dd88d901b9da9c9d.tar.gz |
fix partial checksum errors in DCCP decoder, IPv4 case
Diffstat (limited to 'print-ip.c')
-rw-r--r-- | print-ip.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -131,7 +131,7 @@ trunc: */ int nextproto4_cksum(const struct ip *ip, const u_int8_t *data, - u_int len, u_int next_proto) + u_int len, u_int covlen, u_int next_proto) { struct phdr { u_int32_t src; @@ -155,7 +155,7 @@ nextproto4_cksum(const struct ip *ip, const u_int8_t *data, vec[0].ptr = (const u_int8_t *)(void *)&ph; vec[0].len = sizeof(ph); vec[1].ptr = data; - vec[1].len = len; + vec[1].len = covlen; return (in_cksum(vec, 2)); } |