Wireshark-commits: [Wireshark-commits] master afd0eef: androiddump: Fix tcpdump encap type when lib
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 24 May 2018 07:55:11 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=afd0eef4f63839b30711cba6d0ebe334ff2ef450
Submitter: Roland Knall (rknall@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

afd0eef by Mikael Kanstrup (mikael.kanstrup@xxxxxxxx):

    androiddump: Fix tcpdump encap type when libwiretap is used
    
    androiddump determines encap type by parsing pcap global header from
    tcpdump binary output. Only when libpcap is used with androiddump
    this (pcap linktype) value can be used right away. Libwiretap
    uses its own encap values but is feed with pcap linktype values
    making the whole packet encapsulation invalid.
    
    Fix by converting pcap linktype values into wiretap encap values
    
    (For pcap linktype definitions see http://www.tcpdump.org/linktypes.html)
    (For wtap encap defininitions see wiretap/wtap.h)
    
    Fixes: bfef57ebb7 ("androiddump: Fix and simplify tcpdump capture")
    Change-Id: I5ea86204b8e5774fd84d4007db8c2910680dbd53
    Reviewed-on: https://code.wireshark.org/review/27747
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Reviewed-by: Florian Bezold <florian.bezold@xxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  c59fae2   pfcp: updated names Sx -> PFCP
    adds  afd0eef   androiddump: Fix tcpdump encap type when libwiretap is used


Summary of changes:
 extcap/androiddump.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)