summaryrefslogtreecommitdiff
path: root/print-udp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-05-01 00:23:08 -0700
committerGuy Harris <guy@alum.mit.edu>2019-05-01 00:23:08 -0700
commitbeacedb0b2b2e4ceb1b8b626b94f66ba592356a4 (patch)
treeccf346a7ca6a3b5585a807c8b9d35beefe67f579 /print-udp.c
parenta948af27e45066e7a213dfc5f2f3c7cc324aaa5b (diff)
downloadtcpdump-beacedb0b2b2e4ceb1b8b626b94f66ba592356a4.tar.gz
Remove the IPv6 payload length checks for checksumming.
If there isn't an IPv6 payload, there isn't any TCP or UDP packet, and there's no TCP or UDP header to checksum, so there's no need for the check (it's not there for IPv4).
Diffstat (limited to 'print-udp.c')
-rw-r--r--print-udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-udp.c b/print-udp.c
index ed517580..bf5c7ba5 100644
--- a/print-udp.c
+++ b/print-udp.c
@@ -571,7 +571,7 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
ND_PRINT("[udp sum ok] ");
}
}
- else if (IP_V(ip) == 6 && GET_BE_U_2(ip6->ip6_plen)) {
+ else if (IP_V(ip) == 6) {
/* for IPv6, UDP checksum is mandatory */
if (ND_TTEST_LEN(cp, length)) {
sum = udp6_cksum(ndo, ip6, up, length + sizeof(struct udphdr));