Ticket #152 (closed defect: fixed)

Opened 2 months ago

Last modified 3 days ago

defragmentation leads to packet loss

Reported by: Guilhem Assigned to: pbi
Priority: major Milestone: mainstream
Component: Scapy Version:
Keywords: defrag Cc:

Description

When defragmentation is performed on a packet set, if all fragments of same payload are not present (last fragment does not have MF flag), packet is wrongly reassembled.

Proposition of modification in defrag function : after

p = lst[0] if p.frag > 0: # frame beginning is missing

missfrag.append(lst) continue

add something like :

lastp = lst[-1] # expected packet still not completely received if lastp.flags != 0:

missfrag.append(lst) continue

Concatenation of fragmented packet would also be welcome at the end of the function...

missfrag=reduce(lambda x, y: x + y, missfrag) missfrag.listname="frags"

return nofrag,defrag2,missfrag

Attachments

Change History

01/05/09 19:33:06 changed by pbi

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [b5c13f7fbe29].

For the concatenation of fragmented packets, maybe that's because you are more interested in defragment().


Add/Change #152 (defragmentation leads to packet loss)




Change Properties
Action