aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dnp.c
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2014-07-17 16:42:14 +0100
committerGraham Bloice <graham.bloice@trihedral.com>2014-07-17 15:46:38 +0000
commited043d753a3ece9521a4368fe9dab898483794a8 (patch)
treed644c6242a3d48f613900ee5cd60a37b040e2da4 /epan/dissectors/packet-dnp.c
parent1b8c4bae489caa26cfd5d7b68a25394f286607e4 (diff)
When DNP3 heuristics are disabled, relax the conditions on
accepting a packet as DNP3. Bug: 10287 Change-Id: I222ec885186447c8a72eaf11cebacff8b9b79fad Reviewed-on: https://code.wireshark.org/review/3092 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'epan/dissectors/packet-dnp.c')
-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;
}