diff options
author | standel <standel@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-26 14:42:38 +0000 |
---|---|---|
committer | standel <standel@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-26 14:42:38 +0000 |
commit | cb5bd2e4a1ba018aa3c87ebdea6a82346a7c966f (patch) | |
tree | 33d4d3d855caa00481ea6e1394045e052af5b77d /epan/dissectors/packet-udp.c | |
parent | 0ef4bfd14f681eeed7da73e4815e6c4365411956 (diff) |
Update error handling of UDP Light Illegal Checksum value 0
* change expert group from PI_MALFORMED to PI_CHECKSUM (as it should be!!!).
* set item hf_udp_checksum_[good|bad] as generated
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23599 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-udp.c')
-rw-r--r-- | epan/dissectors/packet-udp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 06e89acbbb..969512ba30 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -301,15 +301,17 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) } else { item = proto_tree_add_uint_format(udp_tree, hf_udp_checksum, tvb, offset + 6, 2, 0, "Checksum: 0x%04x (Illegal)", 0); - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, "Illegal Checksum value (0)"); + expert_add_info_format(pinfo, item, PI_CHECKSUM, PI_ERROR, "Illegal Checksum value (0)"); if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, " [ILLEGAL CHECKSUM (0)]"); checksum_tree = proto_item_add_subtree(item, ett_udp_checksum); - proto_tree_add_boolean(checksum_tree, hf_udp_checksum_good, tvb, + item = proto_tree_add_boolean(checksum_tree, hf_udp_checksum_good, tvb, offset + 6, 2, FALSE); - proto_tree_add_boolean(checksum_tree, hf_udp_checksum_bad, tvb, + PROTO_ITEM_SET_GENERATED(item); + item = proto_tree_add_boolean(checksum_tree, hf_udp_checksum_bad, tvb, offset + 6, 2, TRUE); + PROTO_ITEM_SET_GENERATED(item); } } else if (!pinfo->fragmented && len >= reported_len && len >= udph->uh_sum_cov && reported_len >= udph->uh_sum_cov && |