aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cmpp.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-01-22 18:05:45 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-01-22 18:05:45 +0000
commit227f4e78f80b6898a6e11208f8406cc27c60ce31 (patch)
tree60eacb265a0c93de5d89ea96044f368deddfd0c2 /epan/dissectors/packet-cmpp.c
parent1c512cc373255b45fb999d331329111cc8d0a9c7 (diff)
Don't update COL_INFO at all if not claiming the packet as CMPP. Add a (guessed) upper-size limit on the heuristics and take out a check that the tvb length matches the protocol length--that would essentially disable TCP reassembly of this protocol
svn path=/trunk/; revision=24164
Diffstat (limited to 'epan/dissectors/packet-cmpp.c')
-rw-r--r--epan/dissectors/packet-cmpp.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/epan/dissectors/packet-cmpp.c b/epan/dissectors/packet-cmpp.c
index 20f6ed6721..cfce61fbde 100644
--- a/epan/dissectors/packet-cmpp.c
+++ b/epan/dissectors/packet-cmpp.c
@@ -566,9 +566,7 @@ dissect_cmpp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (match_strval(command_id, vals_command_Id) == NULL)
{
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown command_id %u",
- command_id);
+ /* Should never happen: we checked this in dissect_cmpp() */
return;
}
@@ -578,9 +576,7 @@ dissect_cmpp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* tvb has less data then the PDU Header status, return */
if (tvb_len < total_length)
{
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s pdu length (%u) < Total_Length (%u)",
- command_str, tvb_len, total_length);
+ /* Should never happen: TCP should have desegmented for us */
return;
}
@@ -659,13 +655,14 @@ dissect_cmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
total_length = tvb_get_ntohl(tvb, 0); /* Get the pdu length */
command_id = tvb_get_ntohl(tvb, 4); /* get the pdu command id */
- if (match_strval(command_id, vals_command_Id) == NULL)
- /* This packet does not appear to belong to CMPP.
- * Return 0 to give another dissector a chance to dissect it.
- */
+ /* Looking at this protocol, it seems unlikely that the messages would
+ * get as big as a couple hundred bytes but that's not certain; just
+ * added a hopefully-way-too-big number to strengthen the heuristics.
+ */
+ if (total_length < CMPP_FIX_HEADER_LENGTH || total_length > 1000)
return 0;
- if (tvb_len < total_length || total_length < CMPP_FIX_HEADER_LENGTH)
+ if (match_strval(command_id, vals_command_Id) == NULL)
return 0;
if (check_col(pinfo->cinfo, COL_INFO))