X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftraffic_scripts%2Fipv6_sweep_ping.py;h=da14c5d8ad476441151413326a0c1578edbdbf2f;hp=cf7dc9e6bc51cdec3bb76e7ba5ced90e3820a88f;hb=bc4d98a34af3f26a1c9264758186189f15513a7e;hpb=ae7411c745d47a70bb36c3d5cb6b2907f5697e57 diff --git a/resources/traffic_scripts/ipv6_sweep_ping.py b/resources/traffic_scripts/ipv6_sweep_ping.py index cf7dc9e6bc..da14c5d8ad 100755 --- a/resources/traffic_scripts/ipv6_sweep_ping.py +++ b/resources/traffic_scripts/ipv6_sweep_ping.py @@ -19,7 +19,8 @@ import sys import logging import os logging.getLogger("scapy.runtime").setLevel(logging.ERROR) -from resources.libraries.python.PacketVerifier import RxQueue, TxQueue +from resources.libraries.python.PacketVerifier import RxQueue, TxQueue,\ + checksum_equal from resources.libraries.python.TrafficScriptArg import TrafficScriptArg from scapy.layers.inet6 import IPv6, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr from scapy.layers.inet6 import ICMPv6EchoRequest, ICMPv6EchoReply @@ -94,7 +95,7 @@ def main(): cksum = icmpv6.cksum del icmpv6.cksum tmp = ICMPv6EchoReply(str(icmpv6)) - if tmp.cksum != cksum: + if not checksum_equal(tmp.cksum, cksum): raise RuntimeError( 'Invalid checksum {0} should be {1}'.format(cksum, tmp.cksum))