wireshark: use desegment_offset
If the second (or later message) in a segment needs to be reassembled from
further segments, it's not enough to tell wireshark how long the message is. We
also need to tell it what the offset is from the start of the current segment.
diff --git a/wireshark_gen/templates/openflow.lua b/wireshark_gen/templates/openflow.lua
index 3d62727..9ce51d2 100644
--- a/wireshark_gen/templates/openflow.lua
+++ b/wireshark_gen/templates/openflow.lua
@@ -166,6 +166,7 @@
if offset + msg_len > buf:len() then
-- we don't have all the data we need yet
pkt.desegment_len = offset + msg_len - buf:len()
+ pkt.desegment_offset = offset
return
end
@@ -184,6 +185,7 @@
else
-- we don't have all of length field yet
pkt.desegment_len = DESEGMENT_ONE_MORE_SEGMENT
+ pkt.desegment_offset = offset
return
end
until offset >= buf:len()