diff options
author | Guy Martin <gmsoft@tuxicoman.be> | 2014-05-19 11:14:44 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-05-23 12:47:48 +0000 |
commit | eb3cdb925c29e7e226f3d3a67b42126302bc0d38 (patch) | |
tree | 254ebf8cffb372424dff929e443b7a7cacd0bb60 /epan/dissectors/packet-mp2t.c | |
parent | a344c9736efe5519543da1290e1ad9065d0b0cff (diff) |
Zero out pinfo->src and dst before adding a frag.
If an mp2t packet contains one full subpacket and the fragment of
another one, it happens that the first subpacket will set src or dst to
an ethernet or IP address. Adding the fragment of the second subpacket
will then use this information for calculating the hash in the fragment
table. However, later fragments in other mp2t packets will not have
these info and reassembly will fail.
Change-Id: Ic52763017cb854851b6686654c2d8a1624305d65
Reviewed-on: https://code.wireshark.org/review/1692
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mp2t.c')
-rw-r--r-- | epan/dissectors/packet-mp2t.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index 397e9009a9..af598dc66a 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -527,6 +527,12 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo, save_fragmented = pinfo->fragmented; pinfo->fragmented = TRUE; + /* 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 */ + + SET_ADDRESS_HF(&pinfo->src, AT_NONE, 0, NULL, 0); + SET_ADDRESS_HF(&pinfo->dst, AT_NONE, 0, NULL, 0); + /* check length; send frame for reassembly */ frag_msg = fragment_add_check(&mp2t_reassembly_table, tvb, offset, pinfo, frag_id, NULL, |