linux/net/ipv6
Jakub Sitnicki c64c9c282a udp, bpf: Ignore connections in reuseport group after BPF sk lookup
When BPF sk lookup invokes reuseport handling for the selected socket, it
should ignore the fact that reuseport group can contain connected UDP
sockets. With BPF sk lookup this is not relevant as we are not scoring
sockets to find the best match, which might be a connected UDP socket.

Fix it by unconditionally accepting the socket selected by reuseport.

This fixes the following two failures reported by test_progs.

  # ./test_progs -t sk_lookup
  ...
  #73/14 UDP IPv4 redir and reuseport with conns:FAIL
  ...
  #73/20 UDP IPv6 redir and reuseport with conns:FAIL
  ...

Fixes: a57066b1a0 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200726120228.1414348-1-jakub@cloudflare.com
2020-07-31 02:00:48 +02:00
..
ila net: Add MODULE_DESCRIPTION entries to network modules 2020-06-20 21:33:57 -07:00
netfilter netfilter: switch nf_setsockopt to sockptr_t 2020-07-24 15:41:54 -07:00
Kconfig Replace HTTP links with HTTPS ones: IPv* 2020-07-06 13:23:03 -07:00
Makefile
addrconf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
addrconf_core.c
addrlabel.c
af_inet6.c net: remove compat_sock_common_{get,set}sockopt 2020-07-19 18:16:40 -07:00
ah6.c
anycast.c
calipso.c netlabel: cope with NULL catmap 2020-05-12 18:12:40 -07:00
datagram.c icmp6: support rfc 4884 2020-07-24 17:12:41 -07:00
esp6.c
esp6_offload.c net: Add MODULE_DESCRIPTION entries to network modules 2020-06-20 21:33:57 -07:00
exthdrs.c net: ipv6: kerneldoc fixes 2020-07-13 17:20:39 -07:00
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c ipv6: fib6: avoid indirect calls from fib6_rule_lookup 2020-06-23 15:11:19 -07:00
fou6.c net: Add MODULE_DESCRIPTION entries to network modules 2020-06-20 21:33:57 -07:00
icmp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-11 00:46:00 -07:00
inet6_connection_sock.c
inet6_hashtables.c inet6: Run SK_LOOKUP BPF program on socket lookup 2020-07-17 20:18:17 -07:00
ip6_checksum.c
ip6_fib.c ipv6: fib6: avoid indirect calls from fib6_rule_lookup 2020-06-23 15:11:19 -07:00
ip6_flowlabel.c net/ipv6: switch ipv6_flowlabel_opt to sockptr_t 2020-07-24 15:41:54 -07:00
ip6_gre.c ip6_gre: fix null-ptr-deref in ip6gre_init_net() 2020-07-13 17:32:17 -07:00
ip6_icmp.c ipv6: icmp6: avoid indirect call for icmpv6_send() 2020-06-19 13:41:59 -07:00
ip6_input.c
ip6_offload.c udp: move gro declarations to net/udp.h 2020-06-23 20:10:15 -07:00
ip6_offload.h
ip6_output.c net: ipv6: kerneldoc fixes 2020-07-13 17:20:39 -07:00
ip6_tunnel.c net: ipv6: kerneldoc fixes 2020-07-13 17:20:39 -07:00
ip6_udp_tunnel.c net: Make locking in sock_bindtoindex optional 2020-06-01 14:57:14 -07:00
ip6_vti.c net: vti: implement header_ops->parse_protocol for AF_PACKET 2020-06-30 12:29:39 -07:00
ip6mr.c net/ipv6: switch ip6_mroute_setsockopt to sockptr_t 2020-07-24 15:41:54 -07:00
ipcomp6.c
ipv6_sockglue.c icmp6: support rfc 4884 2020-07-24 17:12:41 -07:00
mcast.c mld: fix memory leak in ipv6_mc_destroy_dev() 2020-06-15 13:29:39 -07:00
mcast_snoop.c
mip6.c
ndisc.c
netfilter.c
output_core.c
ping.c ipv6/ping: set skb->mark on icmpv6 sockets 2020-07-03 14:36:04 -07:00
proc.c
protocol.c
raw.c net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
reassembly.c
route.c bpf: Refactor bpf_iter_reg to have separate seq_info member 2020-07-25 20:16:32 -07:00
rpl.c
rpl_iptunnel.c net: ipv6: Use struct_size() helper and kcalloc() 2020-06-23 20:27:09 -07:00
seg6.c seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2020-06-04 15:39:32 -07:00
seg6_hmac.c crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h 2020-05-08 15:32:17 +10:00
seg6_iptunnel.c seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2020-06-04 15:39:32 -07:00
seg6_local.c seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2020-06-04 15:39:32 -07:00
sit.c net: sit: implement header_ops->parse_protocol for AF_PACKET 2020-06-30 12:29:39 -07:00
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c net/tcp: switch ->md5_parse to sockptr_t 2020-07-24 15:41:54 -07:00
tcpv6_offload.c
tunnel6.c tunnel6: support for IPPROTO_MPLS 2020-05-22 15:49:30 -07:00
udp.c udp, bpf: Ignore connections in reuseport group after BPF sk lookup 2020-07-31 02:00:48 +02:00
udp_impl.h net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
udp_offload.c
udplite.c net/ipv6: remove compat_ipv6_{get,set}sockopt 2020-07-19 18:16:41 -07:00
xfrm6_input.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c