[PATCH] NET: Fix calculation for collapsed skb size
From: Thomas Graf <tgraf@suug.ch>
Date: 2005-02-07 14:27:42
From: Thomas Graf <tgraf@suug.ch>
Date: 2005-02-07 14:27:42
patch also applies to 2.4 with some fuzz. Noticed by Denis V. Lunev [off-list ref] Signed-off-by: Thomas Graf <tgraf@suug.ch>
--- linux-2.6.11-rc3-bk3.orig/net/ipv4/tcp_input.c 2005-02-07 09:47:02.000000000 -0500
+++ linux-2.6.11-rc3-bk3/net/ipv4/tcp_input.c 2005-02-07 09:50:20.000000000 -0500@@ -3760,8 +3760,7 @@ 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)