dissector: fix multi-packet handling
This commit is contained in:
1 parent
f4f3bc3f7c
commit
a4135d359c
1 file changed
+7
-5
@@ -59,6 +59,13 @@ function bc_protocol.dissector(buffer, pinfo, tree)
|
||||
length = buffer:len()
|
||||
if length == 0 then return end
|
||||
|
||||
if buffer:len() < 20 then
|
||||
-- Need more bytes but we don't have a header to learn how many bytes
|
||||
pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT
|
||||
pinfo.desegment_offset = 0
|
||||
return
|
||||
end
|
||||
|
||||
pinfo.cols.protocol = bc_protocol.name
|
||||
|
||||
local magic = buffer(0, 4):le_uint()
|
||||
@@ -69,11 +76,6 @@ function bc_protocol.dissector(buffer, pinfo, tree)
|
||||
return 0
|
||||
end
|
||||
|
||||
if buffer:len() < 20 then
|
||||
-- Need more bytes but we don't have a header to learn how many bytes
|
||||
return DESEGMENT_ONE_MORE_SEGMENT
|
||||
end
|
||||
|
||||
local msg_type = buffer(4, 4):le_uint()
|
||||
local msg_type_str = message_types[msg_type] or "unknown"
|
||||
local msg_len = buffer(8, 4):le_uint()
|
||||
|
||||
Reference in new issue
Block a user