if tcp checksum validation is enabled
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 13 Mar 2006 20:50:50 +0000 (20:50 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 13 Mar 2006 20:50:50 +0000 (20:50 +0000)
and if the checksum is wrong
and if the checksum field is 0x0000

mark the packet as [Checksum Offloaded] and still allow reassembly of
tcp segmetns

since it is most likely just a tco checksum offload engine and not a real checksum error

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17612 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-tcp.c

index d84aec0bdc0b4bbb72c744438c3a0d9a5c73daad..f0fad540b0efad05931dbf8375ff17011aac2bf3 100644 (file)
@@ -2591,6 +2591,13 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
         /* Checksum is valid, so we're willing to desegment it. */
         desegment_ok = TRUE;
+      } else if (th_sum == 0) {
+        /* checksum is probably fine but checksum offload is used */
+        proto_tree_add_uint_format(tcp_tree, hf_tcp_checksum, tvb,
+          offset + 16, 2, th_sum, "Checksum: 0x%04x [Checksum Offloaded]", th_sum);
+
+        /* Checksum is (probably) valid, so we're willing to desegment it. */
+        desegment_ok = TRUE;
       } else {
         proto_item *item;