summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-12-16 22:42:48 +0100
committerMichael Mann <mmann78@netscape.net>2014-12-16 23:08:56 +0000
commitad299df70a8e59f051db33c57daff316cbb0b6ac (patch)
tree621baab75f2e7a981e795780f146172f0c62e128 /epan
parentf4002523e9a37668cc76b6c07b1a69cdf0f39629 (diff)
downloadwireshark-ad299df70a8e59f051db33c57daff316cbb0b6ac.tar.gz
HiSLIP: disable heuristic dissector by default
It is too weak (just checking that the 2 first bytes of TCP segment are "HS") to be always activated Change-Id: Iffda96046cc687004f403dd4d8e735375790b07b Reviewed-on: https://code.wireshark.org/review/5789 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-hislip.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/dissectors/packet-hislip.c b/epan/dissectors/packet-hislip.c
index aae82959cd..5fe7ce2099 100644
--- a/epan/dissectors/packet-hislip.c
+++ b/epan/dissectors/packet-hislip.c
@@ -75,6 +75,8 @@ static gint proto_hislip = -1;
static dissector_handle_t hislip_handle;
+static gboolean hislip_enable_heuristic_dissection = FALSE; /* disabled by default since heuristic is weak */
+
/* Request/Response tracking*/
typedef struct _hislip_transaction_t
@@ -1022,6 +1024,11 @@ proto_register_hislip(void)
"Set the TCP port for HiSLIP traffic if other than the default",
10,
&global_hislip_port);
+ prefs_register_bool_preference(hislip_module,
+ "enable_heuristic",
+ "Enable HiSLIP heuristic dissection",
+ "Enable HiSLIP heuristic dissection (default is disabled)",
+ &hislip_enable_heuristic_dissection);
}
@@ -1034,6 +1041,7 @@ proto_reg_handoff_hislip(void)
if (!initialized)
{
hislip_handle = new_create_dissector_handle(dissect_hislip, proto_hislip);
+ heur_dissector_add("tcp", dissect_hislip_heur, proto_hislip);
initialized = TRUE;
}
else
@@ -1045,7 +1053,7 @@ proto_reg_handoff_hislip(void)
dissector_add_uint("tcp.port", currentPort, hislip_handle);
- heur_dissector_add("tcp", dissect_hislip_heur, proto_hislip);
+ heur_dissector_set_enabled("tcp", dissect_hislip_heur, proto_hislip, hislip_enable_heuristic_dissection);
}
/*