Wireshark-commits: [Wireshark-commits] master-2.6 b1bcb62: make IPv4 and IPv6 name resolution usabl

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 06 Sep 2018 08:29:54 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b1bcb620a3aff525f56a4fdff8fbaf6cf637256e
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

b1bcb62 by Martin Kaiser (wireshark@xxxxxxxxx):

    make IPv4 and IPv6 name resolution usable at all times
    
    IPv4 and v6 name resolution are bound to a capture file. Using a lua
    script, it is possible to trigger a name resolution when no capture file
    is open. This crashes Wireshark as the hash tables for name resolution
    are not initialized at this time.
    
    martin@reykholt:~/src/wireshark.git/build$ echo "print(Address.ip(\"1.1.1.1\"))" > bla.lua
    martin@reykholt:~/src/wireshark.git/build$ ./run/tshark -Xlua_script:bla.lua
    Segmentation fault
    
    martin@reykholt:~/src/wireshark.git/build$ echo "print(Address.ipv6(\"::1\"))" > bla6.lua
    martin@reykholt:~/src/wireshark.git/build$ ./run/tshark -Xlua_script:bla6.lua
    Segmentation fault
    
    Make sure that the hash tables are available as long as the epan library
    is initialized. Add a new function host_name_lookup_reset(), call this
    function every time we set up dissection for a new capture file. This
    way, we keep the name resolution results separate per capture file.
    
    Reorder the steps in init_dissection(). Host name lookup is now
    available at all times, there's no need to be in file scope when it's
    initialized.
    
    Change-Id: I9599100d5f378b6a0f73dc630e4c8af3b3ffb2cc
    Reviewed-on: https://code.wireshark.org/review/29398
    Reviewed-by: Martin Kaiser <wireshark@xxxxxxxxx>
    Petri-Dish: Martin Kaiser <wireshark@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 8681e1deba5fc03146125f33722d2094afd02b7f)
    Reviewed-on: https://code.wireshark.org/review/29444
    

Actions performed:

    from  496f17d   Radius: Fix offset for multiple VSA in one AVP
     add  b1bcb62   make IPv4 and IPv6 name resolution usable at all times


Summary of changes:
 epan/addr_resolv.c | 17 +++++++++++------
 epan/addr_resolv.h | 10 ++--------
 epan/packet.c      | 18 ++++++++++--------
 3 files changed, 23 insertions(+), 22 deletions(-)