aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2005-02-04 22:39:48 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2005-02-04 22:39:48 +0000
commit04a154ec0aad81adb92e1b0e575fb5f65e937449 (patch)
tree361996c59248f9a83f0115af38aeff16aa3b946a /epan
parent2c89242aac8c22f79fd8246079a729c5f65ba5d1 (diff)
Add detection of zero checksum.
svn path=/trunk/; revision=13294
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sctp.c4
-rw-r--r--epan/dissectors/packet-sctp.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 662e9b59ab..250110f748 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -1965,7 +1965,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree, pr
if (padding_length > 0)
proto_tree_add_item(chunk_tree, hf_chunk_padding, chunk_tvb, CHUNK_HEADER_OFFSET + length, padding_length, NETWORK_BYTE_ORDER);
- if (useinfo && ((type == SCTP_DATA_CHUNK_ID) || show_always_control_chunks))
+ if (useinfo && ((type == SCTP_DATA_CHUNK_ID) || show_always_control_chunks) && check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_fence(pinfo->cinfo, COL_INFO);
return result;
@@ -2033,6 +2033,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
length = tvb_length(tvb);
checksum = tvb_get_ntohl(tvb, CHECKSUM_OFFSET);
+ sctp_info.checksum_zero = (checksum == 0);
+
switch(sctp_checksum) {
case SCTP_CHECKSUM_NONE:
break;
diff --git a/epan/dissectors/packet-sctp.h b/epan/dissectors/packet-sctp.h
index 72e5cd594f..484c8d11c2 100644
--- a/epan/dissectors/packet-sctp.h
+++ b/epan/dissectors/packet-sctp.h
@@ -35,6 +35,7 @@ struct _sctp_info {
gboolean adler32_correct;
gboolean crc32c_calculated;
gboolean crc32c_correct;
+ gboolean checksum_zero;
guint32 verification_tag;
guint32 number_of_tvbs;
tvbuff_t *tvb[MAXIMUM_NUMBER_OF_TVBS];