android_kernel_oneplus_msm8998/net/ipv6
Wei Wang a0271af208 net: ipv6: reset daddr and dport in socket if connect() fails
In __ip6_datagram_connect(), reset socket->socket_v6_daddr and inet->dport if
error occurs.
In udp_v6_early_demux(), check for socket_state to make sure it is in
TCP_ESTABLISHED state.
Together, it makes sure unconnected UDP socket won't be considered as a
valid candidate for early demux.

v3: add TCP_ESTABLISHED state check in udp_v6_early_demux()
v2: fix compilation error

CRs-Fixed: 2057820
Change-Id: Ifa9c2ddfaa5b51d4082b7b1dd8a5d03b3c290705
Fixes: 5425077d73e0 ("net: ipv6: Add early demux handler for UDP unicast")
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: 85cb73ff9b74785a7fc752875d7f0fe17ca3ea7c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-07-12 15:09:29 -06:00
..
netfilter net: ipv6: Optimize ipv6 packet matching 2017-04-19 11:56:49 -06:00
addrconf.c Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
addrconf_core.c
addrlabel.c ipv6/addrlabel: fix ip6addrlbl_get() 2015-12-22 15:57:54 -05:00
af_inet6.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
ah6.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
anycast.c
datagram.c net: ipv6: reset daddr and dport in socket if connect() fails 2017-07-12 15:09:29 -06:00
esp6.c Merge remote-tracking branch 'common/android-4.4' into android-4.4.y 2017-01-03 11:23:35 -08:00
exthdrs.c ipv6: add complete rcu protection around np->opt 2015-12-02 23:37:16 -05:00
exthdrs_core.c This is the 4.4.16 stable release 2016-08-01 15:57:55 -07:00
exthdrs_offload.c
fib6_rules.c ipv6: Do not leak throw route references 2017-07-05 14:37:14 +02:00
icmp.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
ila.c
inet6_connection_sock.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: Do not leak throw route references 2017-07-05 14:37:14 +02:00
ip6_flowlabel.c ipv6: fix a lockdep splat 2016-03-03 15:07:05 -08:00
ip6_gre.c Merge tag v4.4.55 into branch 'msm-4.4' 2017-03-23 03:22:14 -07:00
ip6_icmp.c
ip6_input.c
ip6_offload.c Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4' 2017-06-20 14:55:15 -07:00
ip6_offload.h
ip6_output.c Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
ip6_tunnel.c This is the 4.4.66 stable release 2017-05-03 08:50:11 -07:00
ip6_udp_tunnel.c
ip6_vti.c vti6: return GRE_KEY for vti6 2017-03-22 11:28:51 +00:00
ip6mr.c ip6mr: fix notification device destruction 2017-05-02 21:19:54 -07:00
ipcomp6.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
ipv6_sockglue.c ipv6: add complete rcu protection around np->opt 2015-12-02 23:37:16 -05:00
Kconfig
Makefile
mcast.c mld, igmp: Fix reserved tailroom calculation 2016-04-20 15:41:58 +09:00
mcast_snoop.c
mip6.c
ndisc.c net: ipv6: Add sysctl for minimum prefix len acceptable in RIOs. 2017-03-23 05:03:51 +00:00
netfilter.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
output_core.c ipv6: Prevent overrun when parsing v6 header options 2017-06-07 12:05:58 +02:00
ping.c This is the 4.4.72 stable release 2017-06-14 16:33:25 +02:00
proc.c
protocol.c
raw.c This is the 4.4.72 stable release 2017-06-14 16:33:25 +02:00
reassembly.c Revert "Merge remote-tracking branch 'msm-4.4/tmp-510d0a3f' into msm-4.4" 2016-08-26 14:34:05 -07:00
route.c Merge remote-tracking branch 'origin/tmp-285c137' into msm-4.4 2017-05-15 05:09:49 -07:00
sit.c sit: fix a double free on error path 2017-02-18 16:39:27 +01:00
syncookies.c net: inet: Support UID-based routing in IP protocols. 2017-01-02 14:44:15 +05:30
sysctl_net_ipv6.c
tcp_ipv6.c Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4' 2017-06-28 10:03:23 -07:00
tcpv6_offload.c
tunnel6.c ipv6: fix tunnel error handling 2015-11-03 10:52:13 -05:00
udp.c net: ipv6: reset daddr and dport in socket if connect() fails 2017-07-12 15:09:29 -06:00
udp_impl.h
udp_offload.c ipv6: Check ip6_find_1stfragopt() return value properly. 2017-06-07 12:05:58 +02:00
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-14 13:16:19 +02:00
xfrm6_mode_transport.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-14 13:16:19 +02:00
xfrm6_mode_tunnel.c ipv6: update skb->csum when CE mark is propagated 2016-01-31 11:29:01 -08:00
xfrm6_output.c
xfrm6_policy.c net: Revert upstream changes which break routing in tunnel scenarios 2016-07-21 10:58:54 -06:00
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c