From 3c5293d0ebd29999fe283f740cc19a3b44c0f18a Mon Sep 17 00:00:00 2001 From: HU Date: Thu, 23 Oct 2025 00:34:57 +0200 Subject: [PATCH] fixed dissector for packets with inner IPv4/IPv6 packets --- wireshark/scat.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wireshark/scat.lua b/wireshark/scat.lua index 86a7d30..2227e0b 100644 --- a/wireshark/scat.lua +++ b/wireshark/scat.lua @@ -330,6 +330,20 @@ function gsmtapv3_parse_metadata(t, hdr_buffer, hdr_len) end function gsmtap_wrapper_proto.dissector(tvbuffer, pinfo, treeitem) + -- Detect inner IP packets and forward them to the IP dissector + if tvbuffer:len() > 1 then + local first = tvbuffer(0,1):uint() + local ipver = bit.rshift(first, 4) + if ipver == 4 then + pinfo.cols.protocol = "IPv4" + Dissector.get("ip"):call(tvbuffer, pinfo, treeitem) + return + elseif ipver == 6 then + pinfo.cols.protocol = "IPv6" + Dissector.get("ipv6"):call(tvbuffer, pinfo, treeitem) + return + end + end -- GSMTAPv3 local version = tvbuffer(0, 1):uint() if version == 3 then