Skip to content

bpf: Fix [::] -> [::1] rewrite in sys_sendmsg

Andrey Ignatov netdev 2 versions – Applied

Status from this message: Applied, Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 1 replySuperseded

Changes in v2 from the cover letter

* Fix compile error in patch 1.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2bpf: Fix [::] -> [::1] rewrite in sys_sendmsgnet/ipv6/udp.c+4 -40 replies
2/2selftests/bpf: Test [::] -> [::1] rewrite in sys_sendmsg in test_sock_addrtools/testing/selftests/bpf/test_sock_addr.c+50 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH bpf v2 0/2] bpf: Fix [::] -> [::1] rewrite in sys_sendmsg

The patch set fixes BSD'ism in sys_sendmsg to rewrite unspecified destination IPv6 for unconnected UDP sockets in sys_sendmsg with [::1] in case when either CONFIG_CGROUP_BPF is enabled or when sys_sendmsg BPF hook sets destination IPv6 to [::].

Patch 1 is the fix and provides more details.
Patch 2 adds two test cases to verify the fix.

v1->v2:
* Fix compile error in patch 1.

Andrey Ignatov (2):
bpf: Fix [::] -> [::1] rewrite in sys_sendmsg selftests/bpf: Test [::] -> [::1] rewrite in sys_sendmsg in
test_sock_addr

 net/ipv6/udp.c                               |  8 +--
 tools/testing/selftests/bpf/test_sock_addr.c | 53 ++++++++++++++++++--
 2 files changed, 54 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1