diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-04-09 14:30:07 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-04-11 17:59:11 +0000 |
commit | 5112d1ec27e0b37fe4194fbc627877e28c027261 (patch) | |
tree | eedf66594271057d7b93fa552af298e972d13647 /file.c | |
parent | 76adb4c044fca4b56346a01d655a04bf56fe770c (diff) | |
download | wireshark-5112d1ec27e0b37fe4194fbc627877e28c027261.tar.gz |
Lua: Fix add and remove Fields when reload Lua plugins
Reset wslua_dfilter and remove the Field tap_listener when
reloading plugins.
Check for tap listeners in rescan_packets() after ws_epan_new()
because Lua may register the Lua field tap when adding Fields.
Bug: 12328
Change-Id: Ibbd8339033132c6f3b61d7e9c9ced9ed2b9affec
Reviewed-on: https://code.wireshark.org/review/14871
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1630,6 +1630,12 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, gb cf->epan = ws_epan_new(cf); cf->cinfo.epan = cf->epan; + /* A new Lua tap listener may be registered in lua_prime_all_fields() + called via epan_new() / init_dissection() when reloading Lua plugins. */ + if (!create_proto_tree && have_filtering_tap_listeners()) { + create_proto_tree = TRUE; + } + /* We need to redissect the packets so we have to discard our old * packet list store. */ packet_list_clear(); |