X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip_packet.h;h=6c86e3e046e10d15ece7d015830b4d50e1e66631;hb=79c38af0fded49e65fd09fbd9bfa1dda8af475ec;hp=3c532f10ffefa9eb0a7de293ef2547c56c84148a;hpb=352c2c40c720acefaa49ade61cf9e8fdef3c846f;p=vpp.git diff --git a/src/vnet/ip/ip_packet.h b/src/vnet/ip/ip_packet.h index 3c532f10ffe..6c86e3e046e 100644 --- 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; }