aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-drbd.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal@wireshark.org>2021-05-11 14:03:14 +0200
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-05-12 05:27:04 +0000
commitaee224d5a43cc5939e23b3d7d0edf9d256848e18 (patch)
tree37b5c7018e641e93fb8d57799e5dfdf0f2b0d21c /epan/dissectors/packet-drbd.c
parentcaed4cce7d5b24621c51a80038896300eafda7bc (diff)
DRBD: disable heuristic dissector by default
It is rather weak and thus can easily trigger false positives. While in the area, ensure that the minimu number of bytes were captured for heuristic checks.
Diffstat (limited to 'epan/dissectors/packet-drbd.c')
-rw-r--r--epan/dissectors/packet-drbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-drbd.c b/epan/dissectors/packet-drbd.c
index 6d9eebe5e2..3eb0fec330 100644
--- a/epan/dissectors/packet-drbd.c
+++ b/epan/dissectors/packet-drbd.c
@@ -662,7 +662,7 @@ static gboolean test_drbd_protocol(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
guint reported_length = tvb_reported_length(tvb);
- if (reported_length < DRBD_FRAME_HEADER_80_LEN) {
+ if (reported_length < DRBD_FRAME_HEADER_80_LEN || tvb_captured_length(tvb) < 4) {
return FALSE;
}
@@ -1224,7 +1224,7 @@ void proto_register_drbd(void)
void proto_reg_handoff_drbd(void)
{
drbd_handle = create_dissector_handle(dissect_drbd, proto_drbd);
- heur_dissector_add("tcp", test_drbd_protocol, "DRBD over TCP", "drbd_tcp", proto_drbd, HEURISTIC_ENABLE);
+ heur_dissector_add("tcp", test_drbd_protocol, "DRBD over TCP", "drbd_tcp", proto_drbd, HEURISTIC_DISABLE);
}
/*