[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1748337614.git.paul.chaignon@gmail.com>
Date: Tue, 27 May 2025 11:47:33 +0200
From: Paul Chaignon <paul.chaignon@...il.com>
To: netdev@...r.kernel.org, bpf@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
David Ahern <dsahern@...nel.org>, Tom Herbert <tom@...bertland.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>
Subject: [PATCH net v2 0/2] net: Fix inet_proto_csum_replace_by_diff for IPv6
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@mail.gmail.com/
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
Powered by blists - more mailing lists