NewLionwang / dpkt

Automatically exported from code.google.com/p/dpkt
Other
0 stars 0 forks source link

IPv6 package sets wrong internet checksum #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In __str__ in the class IP6, IP6 sets the checksum of the payload (TCP or
ICMP6) to 

self.data.sum = dpkt.in_cksum_done(s + self.nxt + len(p))

The correct statement is  
self.data.sum = dpkt.in_cksum_done(s + socket.htons(self.nxt + len(p)))

Original issue reported on code.google.com by avkulka...@gmail.com on 15 Aug 2008 at 5:39

GoogleCodeExporter commented 8 years ago
Thanks for the report, fixed in r50.

Original comment by jon.ober...@gmail.com on 17 Aug 2008 at 8:10

Attachments: