Skip to content

Wireshark dissector broken due to deprecated function use #388

@Maaggs

Description

@Maaggs

Describe the bug
Errors in the Wireshark packet details pane, for example:

Lua Error: /home/myuser/.local/lib/wireshark/plugins/baichuan.lua:320: attempt to index a nil value (global 'bit32')
Lua Traceback
    stack traceback:
     /home/myuser/.local/lib/wireshark/plugins/baichuan.lua:320: in upvalue 'process_header'
     /home/myuser/.local/lib/wireshark/plugins/baichuan.lua:601: in upvalue 'process_bc_message'
     /home/myuser/.local/lib/wireshark/plugins/baichuan.lua:784: in function </home/myuser/.local/lib/wireshark/plugins/baichuan.lua:749>

To Reproduce

  1. Capture a Baichuan packet with Wireshark that utilizes Lua 5.4 or greater
  2. Inspecting the packet to see the error message mentioned above: Lua Error:[...]

Expected behavior
The plugin should not cause any errors related to the missing bit32 library.

Bug Cause
The bit32 library was deprecated with the release of Lua 5.3 and is no longer included in Lua 5.4. Current versions of Wireshark ship with Lua versions greater than 5.4. I am currently using Wireshark 4.6.0 which ships with Lua 5.4.8.

Versions
Wireshark 4.6.0 or higher. Lower versions may also be affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions