From 79daac1e2216adddf3ce41f24ceaca5766797250 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Mon, 2 Mar 2020 11:47:05 +0100 Subject: [PATCH] Always show opt length in Wireshark dissector --- wireshark-nmrp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wireshark-nmrp.lua b/wireshark-nmrp.lua index 6463ccf..234d9eb 100644 --- a/wireshark-nmrp.lua +++ b/wireshark-nmrp.lua @@ -52,13 +52,14 @@ function nmrp_dissect_opt(opt, buffer, tree) return end + tree:add(opt_len_f, buffer(2, 2)) + if opt == 0x01 or opt == 0x0181 then tree:add(buffer(4), "Value: " .. buffer(4):string()) elseif opt == 0x02 then tree:add(buffer(4, 4), "Address: " .. tostring(buffer(4, 4):ipv4())) tree:add(buffer(8, 4), "Netmask: " .. tostring(buffer(8, 4):ipv4())) else - tree:add(opt_len_f, buffer(2, 2)) tree:add(opt_data_f, buffer(4, buffer:len() - 4)) end end -- 2.25.1