linux/net
Eric Dumazet 7c85af8810 tcp: avoid reorders for TFO passive connections
We found that a TCP Fast Open passive connection was vulnerable
to reorders, as the exchange might look like

[1] C -> S S <FO ...> <request>
[2] S -> C S. ack request <options>
[3] S -> C . <answer>

packets [2] and [3] can be generated at almost the same time.

If C receives the 3rd packet before the 2nd, it will drop it as
the socket is in SYN_SENT state and expects a SYNACK.

S will have to retransmit the answer.

Current OOO avoidance in linux is defeated because SYNACK
packets are attached to the LISTEN socket, while DATA packets
are attached to the children. They might be sent by different cpus,
and different TX queues might be selected.

It turns out that for TFO, we created a child, which is a
full blown socket in TCP_SYN_RECV state, and we simply can attach
the SYNACK packet to this socket.

This means that at the time tcp_sendmsg() pushes DATA packet,
skb->ooo_okay will be set iff the SYNACK packet had been sent
and TX completed.

This removes the reorder source at the host level.

We also removed the export of tcp_try_fastopen(), as it is no
longer called from IPv6.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-28 22:11:19 -07:00
..
6lowpan ieee820154: 6lowpan: dispatch evaluation rework 2015-09-17 13:20:03 +02:00
9p net/9p: Remove ib_get_dma_mr calls 2015-08-30 18:12:36 -04:00
802
8021q net: 8021q: convert to using IFF_NO_QUEUE 2015-08-18 11:55:06 -07:00
appletalk
atm atm: deal with setting entry before mkip was called 2015-09-17 22:13:32 -07:00
ax25
batman-adv batman-adv: turn batadv_neigh_node_get() into local function 2015-08-27 20:15:34 +02:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
bridge bridge: Allow forward delay to be cfgd when STP enabled 2015-09-27 19:09:38 -07:00
caif net: caif: convert to using IFF_NO_QUEUE 2015-08-18 11:55:07 -07:00
can
ceph libceph: don't access invalid memory in keepalive2 path 2015-09-17 20:14:15 +03:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
dcb
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
decnet netfilter: Pass priv instead of nf_hook_ops to netfilter hooks 2015-09-18 22:00:16 +02:00
dns_resolver
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
ethernet flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
hsr net: hsr: convert to using IFF_NO_QUEUE 2015-08-18 11:55:07 -07:00
ieee802154 ieee802154: 6lowpan: use correct ESC value for dispatch 2015-09-17 13:20:04 +02:00
ipv4 tcp: avoid reorders for TFO passive connections 2015-09-28 22:11:19 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
ipx
irda
iucv s390/iucv: do not use arrays as argument 2015-09-21 16:03:04 -07:00
key net: Fix RCU splat in af_key 2015-08-24 14:48:10 -07:00
l2tp l2tp: auto load IP modules 2015-09-25 12:27:22 -07:00
lapb
llc
mac80211 mac80211: reset CQM history upon reconfiguration 2015-09-22 15:22:50 +02:00
mac802154
mpls mpls: fix mpls_net_init memory leak 2015-08-31 12:45:09 -07:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
netlabel
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
netrom
nfc nfc: netlink: Add capability to reply to vendor_cmd with data 2015-08-20 22:00:11 +02:00
openvswitch vxlan: support both IPv4 and IPv6 sockets in a single vxlan device 2015-09-26 22:40:55 -07:00
packet Fix AF_PACKET ABI breakage in 4.2 2015-09-23 14:33:55 -07:00
phonet
rds Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-10 13:53:15 -07:00
rfkill rfkill: Copy "all" global state to other types 2015-09-04 14:26:56 +02:00
rose
rxrpc rxrpc: Replace get_seconds with ktime_get_seconds 2015-09-20 21:53:56 -07:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-09-26 16:08:27 -07:00
sctp sctp: fix race on protocol/netns initialization 2015-09-11 15:00:02 -07:00
sunrpc NFS client bugfixes for Linux 4.3 2015-09-25 11:33:52 -07:00
switchdev switchdev: reduce transaction phase enum down to a boolean 2015-09-24 22:59:22 -07:00
tipc tipc: reinitialize pointer after skb linearize 2015-09-20 22:31:20 -07:00
unix
vmw_vsock
wimax
wireless cfg80211: regulatory: restore proper user alpha2 2015-09-04 14:29:25 +02:00
x25
xfrm inet: constify ip_route_output_flow() socket argument 2015-09-25 13:00:37 -07:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c