diff options
-rw-r--r-- | net/core/skbuff.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c8259ac38745..29f7f0121491 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -3936,7 +3936,8 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, | |||
3936 | return false; | 3936 | return false; |
3937 | 3937 | ||
3938 | if (len <= skb_tailroom(to)) { | 3938 | if (len <= skb_tailroom(to)) { |
3939 | BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len)); | 3939 | if (len) |
3940 | BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len)); | ||
3940 | *delta_truesize = 0; | 3941 | *delta_truesize = 0; |
3941 | return true; | 3942 | return true; |
3942 | } | 3943 | } |
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 | ||