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 /plugins/m2m | |
parent | 3295912210fa1a8d7d0b1a18aa7c100f27905ed1 (diff) | |
download | wireshark-a2414d8909088ddb40c907886e725993e6baecb5.tar.gz wireshark-a2414d8909088ddb40c907886e725993e6baecb5.tar.bz2 wireshark-a2414d8909088ddb40c907886e725993e6baecb5.zip |
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 'plugins/m2m')
-rw-r--r-- | plugins/m2m/packet-m2m.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c index 48025252e6..8c4de49627 100644 --- a/plugins/m2m/packet-m2m.c +++ b/plugins/m2m/packet-m2m.c @@ -55,7 +55,7 @@ static dissector_handle_t wimax_hack_burst_handle; static dissector_handle_t wimax_pdu_burst_handle; static dissector_handle_t wimax_phy_attributes_burst_handle; -static GHashTable *pdu_frag_table = NULL; +static reassembly_table pdu_reassembly_table; static gint proto_m2m = -1; @@ -158,7 +158,8 @@ static gint hf_m2m_phy_attributes = -1; static void m2m_defragment_init(void) { - fragment_table_init(&pdu_frag_table); + reassembly_table_init(&pdu_reassembly_table, + &addresses_reassembly_table_functions); } @@ -454,7 +455,7 @@ static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint } else /* fragmented PDU */ { /* add the frag */ - pdu_frag = fragment_add_seq(tvb, offset, pinfo, burst_number, pdu_frag_table, frag_number - 1, length, ((frag_type==TLV_LAST_FRAG)?0:1)); + pdu_frag = fragment_add_seq(&pdu_reassembly_table, tvb, offset, pinfo, burst_number, NULL, frag_number - 1, length, ((frag_type==TLV_LAST_FRAG)?0:1), 0); if(pdu_frag && frag_type == TLV_LAST_FRAG) { /* create the new tvb for defraged frame */ |