[SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
authorPatrick McHardy <kaber@trash.net>
Mon, 9 Apr 2007 18:45:04 +0000 (11:45 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:28:36 +0000 (22:28 -0700)
Since we're increasing the headroom, the header offsets need to be
increased by the same amount as well.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index f927b6e8027e3041b43cc065d0c763448e8674c2..4965df29768bb792b79a340969a4a6a45052933a 100644 (file)
@@ -667,14 +667,15 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
        skb->data    += off;
 #ifdef NET_SKBUFF_DATA_USES_OFFSET
        skb->end      = size;
+       off           = nhead;
 #else
        skb->end      = skb->head + size;
+#endif
        /* {transport,network,mac}_header and tail are relative to skb->head */
        skb->tail             += off;
        skb->transport_header += off;
        skb->network_header   += off;
        skb->mac_header       += off;
-#endif
        skb->cloned   = 0;
        skb->nohdr    = 0;
        atomic_set(&skb_shinfo(skb)->dataref, 1);