Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fix assert issue in ip_csum_add_even()
[vpp.git]
/
src
/
vnet
/
ip
/
ip_packet.h
diff --git
a/src/vnet/ip/ip_packet.h
b/src/vnet/ip/ip_packet.h
index
3c532f1
..
6c86e3e
100644
(file)
--- a/
src/vnet/ip/ip_packet.h
+++ b/
src/vnet/ip/ip_packet.h
@@
-107,7
+107,8
@@
ip_csum_add_even (ip_csum_t c, ip_csum_t x)
/* Fold in carry from high bit. */
d -= d > c;
- ASSERT (ip_csum_with_carry (d, x) == c);
+ ip_csum_t t = ip_csum_with_carry (d, x);
+ ASSERT ((t - c == 0) || (t - c == ~0));
return d;
}