Signed-off-by: Isaku Yamahata <[email protected]>
---
ryu/lib/packet/icmpv6.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/ryu/lib/packet/icmpv6.py b/ryu/lib/packet/icmpv6.py
index bcad884..e3bd781 100644
--- a/ryu/lib/packet/icmpv6.py
+++ b/ryu/lib/packet/icmpv6.py
@@ -17,6 +17,7 @@ import struct
import sys
import array
import binascii
+
from . import packet_base
from . import packet_utils
from ryu.lib.mac import haddr_to_bin, haddr_to_str
@@ -98,15 +99,8 @@ class icmpv6(packet_base.PacketBase):
hdr += self.data.serialize()
else:
hdr += self.data
- src = prev.src
- dst = prev.dst
- nxt = prev.nxt
if self.csum == 0:
- length = len(str(hdr))
- ph = struct.pack('!16s16sBBH', prev.src, prev.dst, 0, prev.nxt,
- length)
- f = ph + hdr + payload
- self.csum = packet_utils.checksum(f)
+ self.csum = packet_utils.checksum_ip(prev, len(hdr), hdr + payload)
struct.pack_into('!H', hdr, 2, self.csum)
return hdr
--
1.7.10.4
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel