aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ltp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-03-22 23:59:54 +0000
committerGuy Harris <guy@alum.mit.edu>2013-03-22 23:59:54 +0000
commita2414d8909088ddb40c907886e725993e6baecb5 (patch)
tree53f0ebac8baa171f4317c7eb502a354da8596c72 /epan/dissectors/packet-ltp.c
parent3295912210fa1a8d7d0b1a18aa7c100f27905ed1 (diff)
Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
Diffstat (limited to 'epan/dissectors/packet-ltp.c')
-rw-r--r--epan/dissectors/packet-ltp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ltp.c b/epan/dissectors/packet-ltp.c
index 024368e997..2eea5eda69 100644
--- a/epan/dissectors/packet-ltp.c
+++ b/epan/dissectors/packet-ltp.c
@@ -44,8 +44,7 @@
void proto_reg_handoff_ltp(void);
/* For reassembling LTP segments */
-static GHashTable *ltp_fragment_table = NULL;
-static GHashTable *ltp_reassembled_table = NULL;
+static reassembly_table ltp_reassembly_table;
/* Initialize the protocol and registered fields */
static int proto_ltp = -1;
@@ -316,14 +315,16 @@ dissect_data_segment(proto_tree *ltp_tree, tvbuff_t *tvb,packet_info *pinfo,int
frame_offset += rpt_sno_size;
more_frags = FALSE;
- frag_msg = fragment_add_check(tvb, frame_offset, pinfo, (guint32)session_num, ltp_fragment_table,
- ltp_reassembled_table, (guint32)offset, (guint32)length, more_frags);
+ frag_msg = fragment_add_check(&ltp_reassembly_table,
+ tvb, frame_offset, pinfo, (guint32)session_num, NULL,
+ (guint32)offset, (guint32)length, more_frags);
}
else
{
more_frags = TRUE;
- frag_msg = fragment_add_check(tvb, frame_offset, pinfo, (guint32)session_num, ltp_fragment_table,
- ltp_reassembled_table, (guint32)offset, (guint32)length, more_frags);
+ frag_msg = fragment_add_check(&ltp_reassembly_table,
+ tvb, frame_offset, pinfo, (guint32)session_num, NULL,
+ (guint32)offset, (guint32)length, more_frags);
}
@@ -777,8 +778,8 @@ dissect_ltp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
static void
ltp_defragment_init(void) {
- fragment_table_init(&ltp_fragment_table);
- reassembled_table_init(&ltp_reassembled_table);
+ reassembly_table_init(&ltp_reassembly_table,
+ &addresses_reassembly_table_functions);
}
/* Register the protocol with Wireshark */