mbox series

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

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

Message

Andrey Ignatov Jan. 3, 2019, 10:43 p.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.


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(-)