aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/rtse
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 /asn1/rtse
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 'asn1/rtse')
-rw-r--r--asn1/rtse/packet-rtse-template.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c
index 99a0a163a8..381b1e443e 100644
--- a/asn1/rtse/packet-rtse-template.c
+++ b/asn1/rtse/packet-rtse-template.c
@@ -67,8 +67,7 @@ static dissector_table_t rtse_oid_dissector_table=NULL;
static GHashTable *oid_table=NULL;
static gint ett_rtse_unknown = -1;
-static GHashTable *rtse_segment_table = NULL;
-static GHashTable *rtse_reassembled_table = NULL;
+static reassembly_table rtse_reassembly_table;
static int hf_rtse_segment_data = -1;
static int hf_rtse_fragments = -1;
@@ -235,8 +234,8 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
session->rtse_reassemble = TRUE;
}
if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) {
- frag_msg = fragment_end_seq_next (pinfo, rtse_id, rtse_segment_table,
- rtse_reassembled_table);
+ frag_msg = fragment_end_seq_next (&rtse_reassembly_table,
+ pinfo, rtse_id, NULL);
next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled RTSE",
frag_msg, &rtse_frag_items, NULL, parent_tree);
}
@@ -252,9 +251,10 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
fragment_length = tvb_length_remaining (data_tvb, 0);
proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length,
plurality(fragment_length, "", "s"));
- frag_msg = fragment_add_seq_next (data_tvb, 0, pinfo,
- rtse_id, rtse_segment_table,
- rtse_reassembled_table, fragment_length, TRUE);
+ frag_msg = fragment_add_seq_next (&rtse_reassembly_table,
+ data_tvb, 0, pinfo,
+ rtse_id, NULL,
+ fragment_length, TRUE);
if (frag_msg && pinfo->fd->num != frag_msg->reassembled_in) {
/* Add a "Reassembled in" link if not reassembled in this frame */
proto_tree_add_uint (tree, *(rtse_frag_items.hf_reassembled_in),
@@ -304,8 +304,8 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static void rtse_reassemble_init (void)
{
- fragment_table_init (&rtse_segment_table);
- reassembled_table_init (&rtse_reassembled_table);
+ reassembly_table_init (&rtse_reassembly_table,
+ &addresses_reassembly_table_functions);
}
/*--- proto_register_rtse -------------------------------------------*/