Wireshark-commits: [Wireshark-commits] master-2.6 9997eef: btle: Correctly detect l2cap fragment st
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 30 May 2019 21:23:18 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9997eef374dfe91b5376c3e59159eaeeb05beb23
Submitter: "Stig Bjørlykke <stig@xxxxxxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

9997eef by Jonas Jonsson (jonas@xxxxxxxxxxx):

    btle: Correctly detect l2cap fragment start
    
    The first L2CAP PDU fragment starts with the 4 octet long L2CAP header
    consisting of the Length and the CID fields. The Length field doesn't
    include the header itself. Thus the Length field in the BLE Data header
    will be 4 octets larger than the L2CAP PDU header Length field if the
    packet wouldn't be fragmented.
    
    The current implementation doesn't correctly detect the start fragment
    causing reassembly to fail as it compares the BLE Data Length with the
    L2CAP Length without compensating for the header.
    
    By increasing the L2CAP PDU Length field with the header length the
    reassembly works.
    
    Rename the variable to better reflect what length it actually
    represents.
    
    Bug: 15807
    Change-Id: Idcb6bdccc4daae756a63a9bae0839fe25ae99f23
    Reviewed-on: https://code.wireshark.org/review/33428
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    (cherry picked from commit 49b6523c6cd4f8c56f428797283e150e63a52aad)
    Reviewed-on: https://code.wireshark.org/review/33429
    (cherry picked from commit 7b70ef08a0f9403c287177018c8d21a7e558cccf)
    Reviewed-on: https://code.wireshark.org/review/33430
    

Actions performed:

    from  c0a31ae   Fix handling of headers in body part.
     add  9997eef   btle: Correctly detect l2cap fragment start


Summary of changes:
 epan/dissectors/packet-btle.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)