forked from osmocom/wireshark
Bugfix for S101 dissector:
Make sure that the packet has an S101 header, before setting the protocol name with col_set_str(). Otherwise, all TCP packets on port 9000 may be misidentified as S101 packets.
This commit is contained in:
parent
b034473cb2
commit
8e256b7e69
|
@ -360,9 +360,6 @@ dissect_S101(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (len < S101_MIN_LENGTH)
|
||||
return 0;
|
||||
|
||||
/* Set the Protocol column to the constant string of S101 */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "S101");
|
||||
|
||||
current_offset = 0;
|
||||
do {
|
||||
offset = current_offset;
|
||||
|
@ -370,6 +367,10 @@ dissect_S101(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (0 == find_s101_packet_header(tvb, &offset, &start, &slot, &message, &version, &dtd, &command, &flags, &app_bytes[0], &msgLength, &crc)) {
|
||||
break;
|
||||
}
|
||||
if (0 == current_offset) {
|
||||
/* Set the Protocol column to the constant string of S101 */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "S101");
|
||||
}
|
||||
|
||||
/* create display subtree for the protocol */
|
||||
ti = proto_tree_add_item(tree, proto_S101, tvb, current_offset, -1, ENC_NA);
|
||||
|
|
Loading…
Reference in New Issue