aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-09-15 04:19:52 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-15 14:41:07 -0400
commite93a0435f809d009919a743fb6e93076faac8aa7 (patch)
tree0f6135f75faed65233a68dc0a4b5a183e1a30ed3 /net/core/skbuff.c
parenttcp: use TCP_SKB_CB(skb)->tcp_flags in input path (diff)
downloadlinux-dev-e93a0435f809d009919a743fb6e93076faac8aa7.tar.xz
linux-dev-e93a0435f809d009919a743fb6e93076faac8aa7.zip
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/core/skbuff.c')
-rw-r--r--net/core/skbuff.c3
1 files changed, 2 insertions, 1 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,
return false;
if (len <= skb_tailroom(to)) {
- BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));
+ if (len)
+ BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));
*delta_truesize = 0;
return true;
}