Message ID | 1562837513-745-2-git-send-email-p.pisati@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Fold checksum at the end of bpf_csum_diff and fix | expand |
diff --git a/net/core/filter.c b/net/core/filter.c index f615e42cf4ef..8db7f58f1ea1 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1990,7 +1990,7 @@ BPF_CALL_5(bpf_csum_diff, __be32 *, from, u32, from_size, for (i = 0; i < to_size / sizeof(__be32); i++, j++) sp->diff[j] = to[i]; - return csum_partial(sp->diff, diff_size, seed); + return csum_fold(csum_partial(sp->diff, diff_size, seed)); } static const struct bpf_func_proto bpf_csum_diff_proto = {