]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/core/skbuff.c
net: pskb_expand_head() optimization
[net-next-2.6.git] / net / core / skbuff.c
index 76d33ca5f037a5c886052e9e7aff206ee266c654..7da58a25ad923b74a0486ced4e516305efd0d187 100644 (file)
@@ -817,7 +817,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
        memcpy(data + nhead, skb->head, skb->tail - skb->head);
 #endif
        memcpy(data + size, skb_end_pointer(skb),
-              sizeof(struct skb_shared_info));
+              offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags]));
 
        for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
                get_page(skb_shinfo(skb)->frags[i].page);