It is a day one issue that got copied to subsequent code. Fixes: a489b16854b5 ("conntrack: New userspace connection tracker.") CC: Daniele Di Proietto <diproiet...@ovn.org> Signed-off-by: Darrell Ball <dlu...@gmail.com> --- lib/conntrack.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/conntrack.c b/lib/conntrack.c index 1917fd8..2f2e6a3 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -603,19 +603,14 @@ static inline bool checksum_valid(const struct conn_key *key, const void *data, size_t size, const void *l3) { - uint32_t csum = 0; - if (key->dl_type == htons(ETH_TYPE_IP)) { - csum = packet_csum_pseudoheader(l3); + uint32_t csum = packet_csum_pseudoheader(l3); + return csum_finish(csum_continue(csum, data, size)) == 0; } else if (key->dl_type == htons(ETH_TYPE_IPV6)) { - csum = packet_csum_pseudoheader6(l3); + return packet_csum_upperlayer6(l3, data, key->nw_proto, size) == 0; } else { return false; } - - csum = csum_continue(csum, data, size); - - return csum_finish(csum) == 0; } static inline bool -- 1.9.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev