Issue 80 in dpkt: Data in IPv6 Fragment Header was copied to buf twice.

5 views
Skip to first unread message

dp...@googlecode.com

unread,
Oct 20, 2011, 9:49:08 AM10/20/11
to dp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 80 by ruy.su...@gmail.com: Data in IPv6 Fragment Header was
copied to buf twice.
http://code.google.com/p/dpkt/issues/detail?id=80

What steps will reproduce the problem?
1. Read packet that has ipv6 fragment header.
>>> print "Before :",len(buf)
>>> frame = dpkt.ethernet.Ethernet(buf)
>>> print "After :",len(str(frame))
2. IPv6 Fragment Header Data and IPv6 Data is output both.
>>>
Before : 1510
After : 2958

What is the expected output? What do you see instead?
>>>
Before : 1510
After : 1510

What version of the product are you using? On what operating system?
# $Id: ip6.py 58 2010-03-06 00:06:14Z dugsong $
and
Python 2.7.2

Please provide any additional information below.
IPv6 Fragment Data(self.data) want to be null.

# diff -u ip6.py.old ip6.py
--- ip6.py.old
+++ ip6.py
@@ -237,7 +237,8 @@
)

def unpack(self, buf):
- dpkt.Packet.unpack(self, buf)
+ hdr_size=8
+ dpkt.Packet.unpack(self, buf[:hdr_size])
setattr(self, 'length', self.__hdr_len__)

def _get_frag_off(self):


Reply all
Reply to author
Forward
0 new messages