aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2021-08-25 17:24:31 -0400
committerJohn Thacker <johnthacker@gmail.com>2021-08-27 12:23:00 +0000
commitf997f2889828474bd20eaff4265eade918b85f52 (patch)
tree8f4cd8ae4f54e2f4b2622024f366fa111a8a1b3d /epan
parent4b7bfe35c5f44d348c58d36fed627838577a95ad (diff)
AMQP: Fix dissection of PDUs split across TCP segments
AMQP calls a subdissector table before tcp_dissect_pdus() is used to desegment PDUs (see commit 27c10ed72ea2451bfbb6c0eb50af4280e65a3fcf), so pinfo->can_desegment needs to be restored before it is decremented a second time. Fixes #14217.
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-amqp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index ad44d99bb3..82f8d33421 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -10763,6 +10763,11 @@ dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
conversation_add_proto_data(conv, proto_amqp, conn);
}
check_amqp_version(tvb, conn);
+ /* Restore can_desegment to whatever TCP set it to before calling the
+ * subdissector (which will decrement it a second time) in order for
+ * tcp_dissect_pdus() to work as expected.
+ */
+ pinfo->can_desegment = pinfo->saved_can_desegment;
if (!dissector_try_uint_new(version_table, conn->version, tvb, pinfo, tree, FALSE, data))
{
col_append_str(pinfo->cinfo, COL_INFO, "AMQP (unknown version)");