Wireshark-commits: [Wireshark-commits] master 5076e53: packet: ensure pinfo->curr_layer_num does no
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5076e53ffb2b39d5d9ac2dcf6f2fd626bf2cafd7
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
5076e53 by Peter Wu (peter@xxxxxxxxxxxxx):
packet: ensure pinfo->curr_layer_num does not depend on tree
The TLS dissector relies on a stable value for pinfo->curr_layer_num
between passes to enable handshake reassembly and decryption. A mismatch
could occur if the subdissector accepted the data (len is non-zero), but
did not add any tree items (tree->tree_data->count remains unchanged).
The original change added the check for tree->tree_data->count in order
to remove protocol names that are not visible in the tree. This could
for example occur when the HTTP dissector accepts the data but requests
more data for reassembly.
This desire to hide protocols is understandable, so simply reverting the
change would not be ok. Checking pinfo->desegment_offset is also not
stable. So that leaves the current approach.
Change-Id: I247adafbaa6d23ab9397eadacabaed9e1bfde997
Ping-Bug: 15625
Fixes: v2.5.0rc0-1206-gcd90f732a1 ("Improve frame.protocols accuracy.")
Reviewed-on: https://code.wireshark.org/review/32919
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@xxxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from c802a83 isakmp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
add 5076e53 packet: ensure pinfo->curr_layer_num does not depend on tree
Summary of changes:
epan/packet.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)