diff options
author | Eric Dumazet <edumazet@google.com> | 2014-09-15 07:19:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-15 14:41:07 -0400 |
commit | e93a0435f809d009919a743fb6e93076faac8aa7 (patch) | |
tree | 0f6135f75faed65233a68dc0a4b5a183e1a30ed3 /net/ipv4/tcp_input.c | |
parent | e11ecddf5128011c936cc5360780190cbc901fdc (diff) |
tcp: allow segment with FIN in tcp_try_coalesce()
We can allow a segment with FIN to be aggregated,
if we take care to add tcp flags,
and if skb_try_coalesce() takes care of zero sized skbs.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 8f639a4face9..228bf0c5ff19 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4143,9 +4143,6 @@ static bool tcp_try_coalesce(struct sock *sk, | |||
4143 | 4143 | ||
4144 | *fragstolen = false; | 4144 | *fragstolen = false; |
4145 | 4145 | ||
4146 | if (tcp_hdr(from)->fin) | ||
4147 | return false; | ||
4148 | |||
4149 | /* Its possible this segment overlaps with prior segment in queue */ | 4146 | /* Its possible this segment overlaps with prior segment in queue */ |
4150 | if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq) | 4147 | if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq) |
4151 | return false; | 4148 | return false; |
@@ -4158,6 +4155,7 @@ static bool tcp_try_coalesce(struct sock *sk, | |||
4158 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRCVCOALESCE); | 4155 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRCVCOALESCE); |
4159 | TCP_SKB_CB(to)->end_seq = TCP_SKB_CB(from)->end_seq; | 4156 | TCP_SKB_CB(to)->end_seq = TCP_SKB_CB(from)->end_seq; |
4160 | TCP_SKB_CB(to)->ack_seq = TCP_SKB_CB(from)->ack_seq; | 4157 | TCP_SKB_CB(to)->ack_seq = TCP_SKB_CB(from)->ack_seq; |
4158 | TCP_SKB_CB(to)->tcp_flags |= TCP_SKB_CB(from)->tcp_flags; | ||
4161 | return true; | 4159 | return true; |
4162 | } | 4160 | } |
4163 | 4161 | ||