Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 3513] Lua dissector field registration broken

Date: Wed, 13 Feb 2013 04:08:45 +0000

changed bug 3513

What Removed Added
CC   [email protected]

Comment # 7 on bug 3513 from
For the problem of:
"bad argument #1 to 'new' (Field_new: a field with this name must exist)"

This happens because the registration of new custom ProtoFields doesn't happen
until Proto_commit() is called at the end of wslua_init(), which is after all
the Lua plugins/scripts have been loaded.  So Field.new() fails because the
custom proto field is not yet truly registered, and you can't use Field.new()
afterwards - it can only be used during initial loading in the main script
body, not within dissector/tap callbacks.  So basically right now Field.new()
is only useful for the pre-existing C-code field types.

It's not clear why registering the new fields and subtrees has to be done so
late and in the fashion they are, though.


You are receiving this mail because:
  • You are the assignee for the bug.
  • You are watching all bug changes.