diff options
Diffstat (limited to 'net/ipv6/udp.c')
| -rw-r--r-- | net/ipv6/udp.c | 18 | 
1 files changed, 16 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 91e795bb9ade..bc65e5b7195b 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -56,6 +56,20 @@  #include <trace/events/skb.h>  #include "udp_impl.h" +static void udpv6_destruct_sock(struct sock *sk) +{ +	udp_destruct_common(sk); +	inet6_sock_destruct(sk); +} + +int udpv6_init_sock(struct sock *sk) +{ +	skb_queue_head_init(&udp_sk(sk)->reader_queue); +	sk->sk_destruct = udpv6_destruct_sock; +	set_bit(SOCK_SUPPORT_ZC, &sk->sk_socket->flags); +	return 0; +} +  static u32 udp6_ehashfn(const struct net *net,  			const struct in6_addr *laddr,  			const u16 lport, @@ -182,7 +196,7 @@ static struct sock *udp6_lib_lookup2(struct net *net,  			result = lookup_reuseport(net, sk, skb,  						  saddr, sport, daddr, hnum);  			/* Fall back to scoring if group has connections */ -			if (result && !reuseport_has_conns(sk, false)) +			if (result && !reuseport_has_conns(sk))  				return result;  			result = result ? : sk; @@ -1733,7 +1747,7 @@ struct proto udpv6_prot = {  	.connect		= ip6_datagram_connect,  	.disconnect		= udp_disconnect,  	.ioctl			= udp_ioctl, -	.init			= udp_init_sock, +	.init			= udpv6_init_sock,  	.destroy		= udpv6_destroy_sock,  	.setsockopt		= udpv6_setsockopt,  	.getsockopt		= udpv6_getsockopt,  |