Re: [PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-23 Thread David Miller
From: Wei Wang Date: Thu, 22 Jun 2017 12:03:41 -0700 > From: Wei Wang > > In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if > error occurs so that udp_v6_early_demux() won't consider this socket > as a valid candidate for early demux. > > v2: fix compilation error > > Sign

Re: [PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Maciej Żenczykowski
So this is clearly an improvement over the current state of things. However, I think there is still a very slight race condition in the error case, since I imagine udp early demux might find the socket while ip6_datagram_dst_update() is running. It's possible that inet_dport assignment could simp

[PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
From: Wei Wang In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if error occurs so that udp_v6_early_demux() won't consider this socket as a valid candidate for early demux. v2: fix compilation error Signed-off-by: Wei Wang Acked-by: Maciej Żenczykowski --- net/ipv6/datagra