diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-03-22 23:59:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-03-22 23:59:54 +0000 |
commit | a2414d8909088ddb40c907886e725993e6baecb5 (patch) | |
tree | 53f0ebac8baa171f4317c7eb502a354da8596c72 /epan/dissectors/packet-ndmp.c | |
parent | 3295912210fa1a8d7d0b1a18aa7c100f27905ed1 (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-ndmp.c')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 3b51cfc8f3..5b51fac8e4 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -283,8 +283,7 @@ static const fragment_items ndmp_frag_items = { "NDMP fragments" }; -static GHashTable *ndmp_fragment_table = NULL; -static GHashTable *ndmp_reassembled_table = NULL; +static reassembly_table ndmp_reassembly_table; /* XXX someone should start adding the new stuff from v3, v4 and v5*/ #define NDMP_PROTOCOL_UNKNOWN 0 @@ -3249,10 +3248,8 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { pinfo->fragmented = TRUE; - frag_msg = fragment_add_seq_check(tvb, 4, pinfo, - seq, - ndmp_fragment_table, - ndmp_reassembled_table, + frag_msg = fragment_add_seq_check(&ndmp_reassembly_table, + tvb, 4, pinfo, seq, NULL, frag_num, tvb_length_remaining(tvb, offset)-4, !(ndmp_rm & RPC_RM_LASTFRAG)); @@ -3538,8 +3535,8 @@ dissect_ndmp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat static void ndmp_init(void) { - fragment_table_init(&ndmp_fragment_table); - reassembled_table_init(&ndmp_reassembled_table); + reassembly_table_init(&ndmp_reassembly_table, + &addresses_reassembly_table_functions); } |