Wireshark-commits: [Wireshark-commits] master-2.2 63da580: Clean up the get_if_capabilities_ routin
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 22 Feb 2017 04:10:58 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=63da580596bdb628ca2127c4a0437a8ec1b0289c
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

63da580 by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up the get_if_capabilities_ routines a bit.
    
    Allocate the interface capabilities structure only if we succeed in
    getting a pcap_t handle for it.
    
    For remote devices, explicitly set caps->can_set_rfmon and
    caps->data_link_types, to be a little bit more like what we do for local
    devices.
    
    Change-Id: I985c05f85f165fce4dfe0392569ec51ed1eeb91e
    Reviewed-on: https://code.wireshark.org/review/20242
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit c1ab23d64b3276fec5e3a33a4fa945067bac77e1)
    Reviewed-on: https://code.wireshark.org/review/20243
    

Actions performed:

    from  e563bd1   Make sure we zero out the newly allocated list, otherwise g_list append may dereference ->next containing an arbitrary value.
    adds  63da580   Clean up the get_if_capabilities_ routines a bit.


Summary of changes:
 caputils/capture-pcap-util.c |   29 +++++++++--------------------
 1 file changed, 9 insertions(+), 20 deletions(-)