Skip to content

Commit

Permalink
do not decode ipv6 fragments after the 1st fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
obormot committed May 31, 2021
1 parent 8a79add commit 7396677
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dpkt/ip6.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def unpack(self, buf):
if next_ext_hdr is not None:
self.p = next_ext_hdr

# do not decode fragments after the first fragment
# https://github.com/kbandla/dpkt/issues/575
if self.nxt == 44 and ext.frag_off > 0: # 44 = IP_PROTO_FRAGMENT
self.data = buf
return

try:
self.data = self._protosw[next_ext_hdr](buf)
setattr(self, self.data.__class__.__name__.lower(), self.data)
Expand Down

0 comments on commit 7396677

Please sign in to comment.