MP2T: restore addresses once fragments are added to the hash table

It allows to have "Follow UDP stream" context menu working again

Bug: 11055
Change-Id: I8eae15bfddb45ea033eb8dd2e3f7ca038057421a
Reviewed-on: https://code.wireshark.org/review/7662
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Pascal Quantin 2015-03-12 22:43:30 +01:00 committed by Anders Broman
parent f01a0faf5f
commit 436a064513
1 changed files with 6 additions and 0 deletions

View File

@ -524,9 +524,12 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo,
fragment_head *frag_msg;
tvbuff_t *new_tvb;
gboolean save_fragmented;
address save_src, save_dst;
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
COPY_ADDRESS_SHALLOW(&save_src, &pinfo->src);
COPY_ADDRESS_SHALLOW(&save_dst, &pinfo->dst);
/* It's possible that a fragment in the same packet set an address already
* This will change the hash value, we need to make sure it's NULL */
@ -546,6 +549,9 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo,
frag_msg, &mp2t_msg_frag_items,
NULL, tree);
COPY_ADDRESS_SHALLOW(&pinfo->src, &save_src);
COPY_ADDRESS_SHALLOW(&pinfo->dst, &save_dst);
if (new_tvb) {
/* ti = */ proto_tree_add_item(tree, hf_msg_ts_packet_reassembled, tvb, 0, 0, ENC_NA);
mp2t_dissect_packet(new_tvb, pload_type, pinfo, tree);