Wireshark-commits: [Wireshark-commits] master ab274af: SMB2: properly show reused FIDs
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 29 Feb 2020 08:58:20 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ab274af1ed5ada1e11226c4d80047cc7d2b1ae1a
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

ab274af by Aurelien Aptel (aaptel@xxxxxxxx):

    SMB2: properly show reused FIDs
    
    When dissecting a trace containing the same FID multiple times (for
    different file paths) Wireshark would get confused and show file path
    of the latest occurence of the FID for all usage.
    
    Example:
    
      => open  req "\dir\lol.txt"
      <= open  rsp fid=0x123
    
    from this point, 0x123 is "lol.txt", yet wireshark will show "bar.txt"
    
      => write req fid=0x123 data="foo"
      <= write rsp ok
      => close req fid=0x123
      <= close rsp ok
    
    from this point, 0x123 is no longuer valid
    
      => open  req "\dir\bar.txt"
      <= open  rsp fid=0x123
    
    from this point, 0x123 is "bar.txt"
    
      => write req fid=0x123 data="foo"
      <= write rsp ok
      => close req fid=0x123
      <= close rsp ok
    
    Wireshark displays "bar.txt" for all occurences of 0x123. This patch
    fixes that and stores the interval (in frame numbers) in which each
    FID is valid. From the first time the FID is seen to the time the
    close is done.
    
    Change-Id: I9027bb1756d1dbee0393b50786f49845b79f129c
    Reviewed-on: https://code.wireshark.org/review/36192
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  4fe7fbd   Qt: Changes ProfileModel assert
     add  ab274af   SMB2: properly show reused FIDs


Summary of changes:
 epan/dissectors/packet-smb2.c | 42 ++++++++++++++++++++++++++++++++----------
 epan/dissectors/packet-smb2.h |  6 ++++++
 2 files changed, 38 insertions(+), 10 deletions(-)