summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorHerbert Xu2009-02-06 06:26:52 +0100
committerDavid S. Miller2009-02-06 06:26:52 +0100
commit56035022d86fff45299288cb372a42f752ba23fa (patch)
treeee00ef2a7153e627c3c20aee45b49270008691dc /net/core/dev.c
parentnet: fix some trailing whitespaces (diff)
downloadkernel-qcow2-linux-56035022d86fff45299288cb372a42f752ba23fa.tar.gz
kernel-qcow2-linux-56035022d86fff45299288cb372a42f752ba23fa.tar.xz
kernel-qcow2-linux-56035022d86fff45299288cb372a42f752ba23fa.zip
gro: Fix frag_list merging on imprecisely split packets
The previous fix ad0f9904444de1309dedd2b9e365cae8af77d9b1 (gro: Fix handling of imprecisely split packets) only fixed the case of frags merging, frag_list merging in the same circumstances were still broken. In particular, the packet headers end up in the data stream. This patch fixes this plus another issue where an imprecisely split packet header may be read incorrectly (this is mostly harmless since it'll simply cause the packet to not match and be rejected for GRO). Thanks to Emil Tantilov and Jeff Kirsher for helping to track this down. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3337cf98f231..247f1614a796 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2391,7 +2391,8 @@ void *skb_gro_header(struct sk_buff *skb, unsigned int hlen)
return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL;
return page_address(skb_shinfo(skb)->frags[0].page) +
- skb_shinfo(skb)->frags[0].page_offset + offset;
+ skb_shinfo(skb)->frags[0].page_offset +
+ offset - skb_headlen(skb);
}
EXPORT_SYMBOL(skb_gro_header);