This patchset fixes a bug that causes skb->csum to hold an incorrect value when calling inet_proto_csum_replace_by_diff for an IPv6 packet in CHECKSUM_COMPLETE state. This bug affects BPF helper bpf_l4_csum_replace and IPv6 ILA in adj-transport mode. In those cases, inet_proto_csum_replace_by_diff updates the L4 checksum field after an IPv6 address change. These two changes cancel each other in terms of checksum, so skb->csum shouldn't be updated. Changes in v2: - For BPF, pass the new flag is_ipv6 to inet_proto_csum_replace_by_diff directly instead of calling inet_proto_csum_replace16. - Document the new BPF helper flag. - Fix the usage of inet_proto_csum_replace_by_diff in ILA in a separate patch. - Rebase on net tree. - Link: https://lore.kernel.org/bpf/aCz84JU60wd8etiT@xxxxxxxxxxxxxx/ Paul Chaignon (2): net: Fix checksum update for ILA adj-transport bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE include/net/checksum.h | 2 +- include/uapi/linux/bpf.h | 4 +++- net/core/filter.c | 5 +++-- net/core/utils.c | 4 ++-- net/ipv6/ila/ila_common.c | 6 +++--- tools/include/uapi/linux/bpf.h | 4 +++- 6 files changed, 15 insertions(+), 10 deletions(-) -- 2.43.0