]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Make the -K flag suppress IP and UDP checksum checking as well.
[tcpdump] / print-ip.c
index 8bdf5ebce3e2948bd29baa05120c96aebca919f3..3dd1edb9b0c5b0d2cf1cec7c04022430f4c970ae 100644 (file)
@@ -657,7 +657,7 @@ ip_print(netdissect_options *ndo,
                 printf(")");
             }
 
-           if ((u_char *)ipds->ip + hlen <= snapend) {
+           if (!Kflag && (u_char *)ipds->ip + hlen <= snapend) {
                sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
                if (sum != 0) {
                    ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);