checksum_valid(const struct conn_key *key, const void *data, size_t size,
               const void *l3)
{
    if (key->dl_type == htons(ETH_TYPE_IP)) {
        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)) {
        return packet_csum_upperlayer6(l3, data, key->nw_proto, size) == 0;
    } else {
        COVERAGE_INC(conntrack_l4csum_err);
        return false;
    }
}
checksum_valid(const struct conn_key *key, const void *data, size_t size,
               const void *l3)
{
    if (key->dl_type == htons(ETH_TYPE_IP)) {
        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)) {
        return packet_csum_upperlayer6(l3, data, key->nw_proto, size) == 0;
    } else {
        COVERAGE_INC(conntrack_l4csum_err);
        return false;
    }
}