[TCP]: Fix calculation for collapsed skb size

Linux Kernel Mailing List <[email protected]> Wed, 09 Feb 2005 04:22:58 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1539.1.11, 2005/02/08 20:22:58-08:00, [email protected]

	[TCP]: Fix calculation for collapsed skb size
	
	Noticed by Denis V. Lunev <[email protected]> and based upon
	original patch by Alexey Kuznetsov <[email protected]>
	
	Signed-off-by: Thomas Graf <[email protected]>
	Signed-off-by: David S. Miller <[email protected]>



 tcp_input.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	2005-02-15 11:02:44 -08:00
+++ b/net/ipv4/tcp_input.c	2005-02-15 11:02:44 -08:00
@@ -3647,8 +3647,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)