aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/idmp
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/idmp
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/idmp')
-rw-r--r--asn1/idmp/packet-idmp-template.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c
index a02cd5ae25..72c369e48a 100644
--- a/asn1/idmp/packet-idmp-template.c
+++ b/asn1/idmp/packet-idmp-template.c
@@ -67,8 +67,7 @@ static int hf_idmp_final = -1;
static int hf_idmp_length = -1;
static int hf_idmp_PDU = -1;
-static GHashTable *idmp_segment_table = NULL;
-static GHashTable *idmp_reassembled_table = NULL;
+static reassembly_table idmp_reassembly_table;
static int hf_idmp_fragments = -1;
static int hf_idmp_fragment = -1;
@@ -195,8 +194,8 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
idmp_final ? "Final " : "" ,
idmp_length, plurality(idmp_length, "", "s"));
- fd_head = fragment_add_seq_next(tvb, offset, pinfo, dst_ref,
- idmp_segment_table, idmp_reassembled_table,
+ fd_head = fragment_add_seq_next(&idmp_reassembly_table, tvb, offset,
+ pinfo, dst_ref, NULL,
idmp_length, !idmp_final);
if(fd_head && fd_head->next) {
@@ -258,8 +257,8 @@ static void dissect_idmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pare
static void idmp_reassemble_init (void)
{
- fragment_table_init (&idmp_segment_table);
- reassembled_table_init (&idmp_reassembled_table);
+ reassembly_table_init (&idmp_reassembly_table,
+ &addresses_reassembly_table_functions);
saved_protocolID = NULL;
}