]> The Tcpdump Group git mirrors - tcpdump/commitdiff
The checksum is optional in UDP-over-IPv4, so go back to the earlier
authorGuy Harris <[email protected]>
Thu, 5 Mar 2009 09:42:33 +0000 (01:42 -0800)
committerGuy Harris <[email protected]>
Thu, 5 Mar 2009 09:42:33 +0000 (01:42 -0800)
behavior where it's checked only with -vv and higher.

print-udp.c

index f4517feed6465022c90247ff565e8aaec7d5e9b1..5e564cded8dc8366521b300d0c031795767afc96 100644 (file)
@@ -568,7 +568,7 @@ udp_print(register const u_char *bp, u_int length,
        }
        udpipaddr_print(ip, sport, dport);
 
-       if (IP_V(ip) == 4 && vflag && !Kflag && !fragmented) {
+       if (IP_V(ip) == 4 && (vflag > 1) && !Kflag && !fragmented) {
                int sum = up->uh_sum;
                if (sum == 0) {
                        (void)printf("[no cksum] ");