Wireshark-commits: [Wireshark-commits] master 8681e1d: make IPv4 and IPv6 name resolution usable at
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=8681e1deba5fc03146125f33722d2094afd02b7f
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
8681e1d 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>
Actions performed:
from 65b342f epan: Use g_base64_decode_inplace()
add 8681e1d 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(-)