Thread (16 messages) 16 messages, 4 authors, 2005-02-09

Re: [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE

From: Thomas Graf <tgraf@suug.ch>
Date: 2005-01-29 00:27:01

* Thomas Graf [ref] 2005-01-29 01:21
quoted hunk ↗ jump to hunk
--- linux-2.6.11-rc2-bk4.orig/net/ipv4/tcp_input.c	2005-01-26 18:19:42.000000000 +0100
+++ linux-2.6.11-rc2-bk4/net/ipv4/tcp_input.c	2005-01-29 01:12:30.000000000 +0100
@@ -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 + 31, 0);
 
 		/* Too big header? This can happen with IPv6. */
 		if (copy < 0)
Sorry, this is incomplete, we should refetch copy via (skb->end - skb->head) after
allocating it.  I have to think some more about this first. ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help