New issue 55 by googa...@jlm.ofb.net: dpkt.ip.IP constructor generates
packet with incorrect 'len' field.
http://code.google.com/p/dpkt/issues/detail?id=55
What steps will reproduce the problem?
### Begin sample code ###
from dpkt import ip
ip1 = ip.IP(data="Hello world!")
ip2 = ip.IP(str(ip1))
ip1.len = ip1.len + 12
ip3 = ip.IP(str(ip1))
print repr(str(ip1))
print repr(str(ip2))
print repr(str(ip3))
### End sample code ###
What is the expected output? What do you see instead?
Expect ip1 to be the same as ip2, ip3 to have a 'len' field 12 too large.
Actual ip2 is truncated to have no payload, ip3 is same as ip1.
What version of the product are you using? On what operating system?
dpkt 1.6 on Ubuntu 10.10 (package 1.6+svn54-1)
Please provide any additional information below.