netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] net: Fix inet_proto_csum_replace_by_diff for IPv6
@ 2025-05-29 10:27 Paul Chaignon
  2025-05-29 10:28 ` [PATCH net v3 1/2] net: Fix checksum update for ILA adj-transport Paul Chaignon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Chaignon @ 2025-05-29 10:27 UTC (permalink / raw)
  To: netdev, bpf
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	David Ahern, Tom Herbert, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko

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 v3:
  - Rebase.
  - Use proper tag for reference, per Paolo's suggestion.
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       | 2 ++
 net/core/filter.c              | 5 +++--
 net/core/utils.c               | 4 ++--
 net/ipv6/ila/ila_common.c      | 6 +++---
 tools/include/uapi/linux/bpf.h | 2 ++
 6 files changed, 13 insertions(+), 8 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-31  5:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 10:27 [PATCH net v3 0/2] net: Fix inet_proto_csum_replace_by_diff for IPv6 Paul Chaignon
2025-05-29 10:28 ` [PATCH net v3 1/2] net: Fix checksum update for ILA adj-transport Paul Chaignon
2025-05-29 10:28 ` [PATCH net v3 2/2] bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE Paul Chaignon
2025-05-31  5:10 ` [PATCH net v3 0/2] net: Fix inet_proto_csum_replace_by_diff for IPv6 patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).