diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-12-17 11:33:33 +0100 | 
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-12-17 11:33:33 +0100 | 
| commit | 1758047057dbe329be712a31b79db7151b5871f8 (patch) | |
| tree | 00203eb55328f2feda70b3d37c964287b364796f /net/ipv6/udp.c | |
| parent | bcae3af286f49bf4f6cda03f165fbe530f4a6bed (diff) | |
| parent | 1c405ca11bf563de1725e5ecfb4a74ee289d2ee9 (diff) | |
Merge drm/drm-next into drm-misc-next-fixes
Backmerging to bring drm-misc-next-fixes up to the latest state for
the current release cycle.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'net/ipv6/udp.c')
| -rw-r--r-- | net/ipv6/udp.c | 17 | 
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index ea53847b5b7e..e43b31d25fb6 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -133,7 +133,8 @@ static int compute_score(struct sock *sk, struct net *net,  	dev_match = udp_sk_bound_dev_eq(net, sk->sk_bound_dev_if, dif, sdif);  	if (!dev_match)  		return -1; -	score++; +	if (sk->sk_bound_dev_if) +		score++;  	if (READ_ONCE(sk->sk_incoming_cpu) == raw_smp_processor_id())  		score++; @@ -699,9 +700,9 @@ static int udpv6_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)  			ret = encap_rcv(sk, skb);  			if (ret <= 0) { -				__UDP_INC_STATS(sock_net(sk), -						UDP_MIB_INDATAGRAMS, -						is_udplite); +				__UDP6_INC_STATS(sock_net(sk), +						 UDP_MIB_INDATAGRAMS, +						 is_udplite);  				return -ret;  			}  		} @@ -883,7 +884,7 @@ static void udp6_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst)  	if (udp_sk_rx_dst_set(sk, dst)) {  		const struct rt6_info *rt = (const struct rt6_info *)dst; -		inet6_sk(sk)->rx_dst_cookie = rt6_get_cookie(rt); +		sk->sk_rx_dst_cookie = rt6_get_cookie(rt);  	}  } @@ -1072,7 +1073,7 @@ INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)  	dst = READ_ONCE(sk->sk_rx_dst);  	if (dst) -		dst = dst_check(dst, inet6_sk(sk)->rx_dst_cookie); +		dst = dst_check(dst, sk->sk_rx_dst_cookie);  	if (dst) {  		/* set noref for now.  		 * any place which wants to hold dst has to call @@ -1303,7 +1304,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)  	int addr_len = msg->msg_namelen;  	bool connected = false;  	int ulen = len; -	int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; +	int corkreq = READ_ONCE(up->corkflag) || msg->msg_flags&MSG_MORE;  	int err;  	int is_udplite = IS_UDPLITE(sk);  	int (*getfrag)(void *, char *, int, int, int, struct sk_buff *); @@ -1434,7 +1435,6 @@ do_udp_sendmsg:  	if (!fl6.flowi6_oif)  		fl6.flowi6_oif = np->sticky_pktinfo.ipi6_ifindex; -	fl6.flowi6_mark = ipc6.sockc.mark;  	fl6.flowi6_uid = sk->sk_uid;  	if (msg->msg_controllen) { @@ -1470,6 +1470,7 @@ do_udp_sendmsg:  	ipc6.opt = opt;  	fl6.flowi6_proto = sk->sk_protocol; +	fl6.flowi6_mark = ipc6.sockc.mark;  	fl6.daddr = *daddr;  	if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr))  		fl6.saddr = np->saddr;  | 
