mbox series

[bpf,v2,0/2] bpf: Fix [::] -> [::1] rewrite in sys_sendmsg

Message ID cover.1546592666.git.rdna@fb.com
Headers show
Series bpf: Fix [::] -> [::1] rewrite in sys_sendmsg | expand

Message

Andrey Ignatov Jan. 4, 2019, 9:07 a.m. UTC
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(-)

Comments

Alexei Starovoitov Jan. 5, 2019, 4:26 a.m. UTC | #1
On Fri, Jan 04, 2019 at 01:07:06AM -0800, Andrey Ignatov wrote:
> 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.

Applied, Thanks