Commit b9870469 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[TCP]: Fix calculation for collapsed skb size

Noticed by Denis V. Lunev <den@asplinux.ru> and based upon
original patch by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aff4b288
......@@ -3760,8 +3760,7 @@ tcp_collapse(struct sock *sk, struct sk_buff *head,
while (before(start, end)) {
struct sk_buff *nskb;
int header = skb_headroom(skb);
int copy = (PAGE_SIZE - sizeof(struct sk_buff) -
sizeof(struct skb_shared_info) - header - 31)&~15;
int copy = SKB_MAX_ORDER(header, 0);
/* Too big header? This can happen with IPv6. */
if (copy < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment