Skip to content

Commit 3e869af

Browse files
committed
capt.lua: use more tolerant IEEE 1284 ID detection
1 parent 8970872 commit 3e869af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

capt.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,10 @@ function capt_proto.dissector(buffer, pinfo, tree) do
332332
return
333333
end
334334
else
335-
if buflen >= 5 then
335+
local minlen = 8
336+
if buflen >= minlen then
336337
-- check for, and save, device names from IEEE 1284 IDs
337-
if buffer2(0, 5):string() == "\00FMFG" then
338+
if string.match(buffer2(0, minlen):string(), "MFG") then
338339
tmp = buffer2(1):string()
339340
tmp = string.match(tmp, "MDL%:(.-)%;")
340341
dev_journal[get_device_id(tostring(pinfo.src))] = tmp

0 commit comments

Comments
 (0)