aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-dnp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c
index 16b099b169..9670b34d09 100644
--- a/epan/dissectors/packet-dnp.c
+++ b/epan/dissectors/packet-dnp.c
@@ -3405,8 +3405,8 @@ dissect_dnp3_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
{
gint length = tvb_length(tvb);
- /* Check for a dnp packet. It should begin with 0x0564 */
- if ((length < 2) || (tvb_get_ntohs(tvb, 0) != 0x0564)) {
+ /* If heuristics are enabled check it looks like a dnp packet. It should begin with 0x0564 */
+ if (dnp3_heuristics && ((length < 2) || (tvb_get_ntohs(tvb, 0) != 0x0564))) {
/* Not a DNP 3.0 packet, just happened to use the same port */
return FALSE;
}