Skip to content

Commit

Permalink
Don't check can_desegment for older Wiresharks
Browse files Browse the repository at this point in the history
...that did not provide the field.
  • Loading branch information
diegonc committed Feb 4, 2018
1 parent 2982c3e commit 9fe440a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ do
local r, need_more, missing = coroutine.resume(thread, state)
if (r and (need_more == NEED_MORE)) then
state:error("This is an incomplete packet. Refer to next pdu")
if pkt.can_desegment > 0 then
-- XXX older versions of Wireshark did not provide the can_desegment field
if pkt.can_desegment == nil or pkt.can_desegment > 0 then
pkt.desegment_len = missing or DESEGMENT_ONE_MORE_SEGMENT
pkt.desegment_offset = pdu_start
info ("dissector: requesting data -"
Expand Down
5 changes: 3 additions & 2 deletions src/packet-bnetp.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--[[ packet-bnetp.lua build on Sun Feb 4 05:27:17 2018
--[[ packet-bnetp.lua build on Sun Feb 4 06:08:30 2018
packet-bnetp is a Wireshark plugin written in Lua for dissecting the Battle.net® protocol.
Homepage: https://github.com/diegonc/packet-bnetp/
Expand Down Expand Up @@ -199,7 +199,8 @@ do
local r, need_more, missing = coroutine.resume(thread, state)
if (r and (need_more == NEED_MORE)) then
state:error("This is an incomplete packet. Refer to next pdu")
if pkt.can_desegment > 0 then
-- XXX older versions of Wireshark did not provide the can_desegment field
if pkt.can_desegment == nil or pkt.can_desegment > 0 then
pkt.desegment_len = missing or DESEGMENT_ONE_MORE_SEGMENT
pkt.desegment_offset = pdu_start
info ("dissector: requesting data -"
Expand Down

0 comments on commit 9fe440a

Please # to comment.