android_kernel_oneplus_msm8998/net
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
..
6lowpan
9p p9_client_readdir() fix 2017-05-02 21:19:55 -07:00
802
8021q net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev 2017-07-05 14:37:14 +02:00
appletalk
atm
ax25
batman-adv
bluetooth Merge branch 'android-4.4@9bc4622' into branch 'msm-4.4' 2017-06-07 09:31:32 -07:00
bridge This is the 4.4.72 stable release 2017-06-14 16:33:25 +02:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:37:14 +02:00
can
ceph libceph: force GFP_NOIO for socket allocations 2017-04-08 09:53:30 +02:00
core Merge "Merge android-4.4@64a73ff (v4.4.76) into msm-4.4" 2017-07-12 03:29:33 -07:00
dcb
dccp ipv6/dccp: do not inherit ipv6_mc_list from parent 2017-06-07 12:05:57 +02:00
decnet decnet: always not take dst->__refcnt when inserting dst into hash table 2017-07-05 14:37:14 +02:00
dns_resolver
dsa net: dsa: Check return value of phy_connect_direct() 2017-07-05 14:37:19 +02:00
ethernet
hsr
ieee802154
ipc_router soc: qcom: ipc_router: Improve IPC attribution 2017-06-20 15:43:11 +05:30
ipv4 Merge "Merge android-4.4@64a73ff (v4.4.76) into msm-4.4" 2017-07-12 03:29:33 -07:00
ipv6 net: ipv6: reset daddr and dport in socket if connect() fails 2017-07-12 15:09:29 -06:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 14:30:13 +02:00
irda
iucv
key xfrm: Oops on error in pfkey_msg2xfrm_state() 2017-07-05 14:37:21 +02:00
l2tp This is the 4.4.66 stable release 2017-05-03 08:50:11 -07:00
l3mdev
lapb
llc
mac80211 Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
mac802154
mpls
netfilter Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
netlabel
netlink Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4' 2017-05-09 16:50:19 -07:00
netrom
nfc
openvswitch
packet net/packet: fix overflow in check for tp_reserve 2017-05-02 21:19:51 -07:00
phonet
rds RDS: Fix the atomicity for congestion map update 2017-05-02 21:19:49 -07:00
rfkill ANDROID: rfkill: fix unused function warning 2017-05-12 14:36:34 +02:00
rmnet_data net: rmnet_data: Unset logical end points in bridge mode 2017-05-19 21:08:49 +05:30
rose
rxrpc rxrpc: Fix several cases where a padded len isn't checked in ticket decode 2017-06-29 12:48:52 +02:00
sched sched: Remove debug WARN_ONCE messages 2017-05-30 10:48:12 -07:00
sctp sctp: check af before verify address in sctp_addr_id2transport 2017-07-05 14:37:21 +02:00
sunrpc SUNRPC: fix refcounting problems with auth_gss messages. 2017-04-21 09:30:08 +02:00
switchdev
tipc tipc: ignore requests when the connection state is not CONNECTED 2017-06-17 06:39:38 +02:00
unix Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
vmw_vsock VSOCK: Detach QP check should filter out non matching QPs. 2017-04-27 09:09:32 +02:00
wimax
wireless msm: wlan: Update regulatory database 2017-06-16 10:20:11 -07:00
x25
xfrm Merge android-4.4@64a73ff (v4.4.76) into msm-4.4 2017-07-10 03:00:34 -07:00
compat.c
Kconfig
Makefile
socket.c Merge branch 'android-4.4@b834e92' into branch 'msm-4.4' 2017-04-25 12:51:55 -07:00
sysctl_net.c