From 02471b412112818ecdb2ed0d62188245d78c7b7f Mon Sep 17 00:00:00 2001 From: zorvios <35658698+zorvios@users.noreply.github.com> Date: Wed, 1 Jul 2026 22:12:14 +0100 Subject: [PATCH] wireshark: fix Lua 5.4 bitwise operation (#1776) The Nebula Wireshark dissector uses bit32.band() when parsing the Nebula packet type. On Wireshark builds using Lua 5.4, bit32 is not available, which causes dissection to fail with: Lua Error: nebula.lua:65: attempt to index a nil value (global 'bit32') Wireshark bundles Lua BitOp and exposes it globally as bit for Lua dissectors. This is the documented API for maximum backwards compatibility across supported Lua versions. Use bit.band() instead of bit32.band(). --- dist/wireshark/nebula.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/wireshark/nebula.lua b/dist/wireshark/nebula.lua index d17dc7a0..5c7c17f1 100644 --- a/dist/wireshark/nebula.lua +++ b/dist/wireshark/nebula.lua @@ -62,7 +62,7 @@ function nebula.dissector(tvbuf, pktinfo, root) tree:add(pf_version, tvbuf:range(0,1)) local type = tree:add(pf_type, tvbuf:range(0,1)) - local nebula_type = bit32.band(tvbuf:range(0,1):uint(), 0x0F) + local nebula_type = bit.band(tvbuf:range(0,1):uint(), 0x0F) if nebula_type == 0 then local stage = tvbuf(8,8):uint64() tree:add(pf_subtype_handshake, tvbuf:range(1,1))