summaryrefslogtreecommitdiff
path: root/regress/sys/netinet6
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-09-19 18:49:41 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-09-19 18:49:41 +0000
commitb5fe0415f41f66797ad9d578db4880c2249dbcf7 (patch)
tree44733b187c4268f4e109774e6ef2b796adc42457 /regress/sys/netinet6
parentf46f1d03786635298fd1c87b8b36463f261ee951 (diff)
Make checksum comparison more robust. 0xffff is the same as 0.
Diffstat (limited to 'regress/sys/netinet6')
-rw-r--r--regress/sys/netinet6/frag6/frag6_refrag.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/regress/sys/netinet6/frag6/frag6_refrag.py b/regress/sys/netinet6/frag6/frag6_refrag.py
index 3ae38b00a2e..61f6dff4711 100644
--- a/regress/sys/netinet6/frag6/frag6_refrag.py
+++ b/regress/sys/netinet6/frag6/frag6_refrag.py
@@ -57,7 +57,7 @@ for a in ans:
print "reply cksum=%#x" % (reply_cksum)
# change request checksum incrementaly and check with reply
diff_cksum=~(~reply_cksum+~(~request_cksum+~0x8000+0x8100))
- if diff_cksum != -1:
+ if diff_cksum & 0xffff != 0xffff and diff_cksum & 0xffff != 0:
print "CHECKSUM ERROR diff cksum=%#x" % (diff_cksum)
exit(1)
exit(0)