aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-09 14:45:04 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:36 -0400
commit56eb88828b78f6f3b11a2996350092a40745301f (patch)
tree27304b61f22f921d351301ef173009900e802ed9 /net/core
parent29f6af7712c40045e7886d0fa356d97a6f9aba49 (diff)
[SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skbuff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index f927b6e8027e..4965df29768b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -667,14 +667,15 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
667 skb->data += off; 667 skb->data += off;
668#ifdef NET_SKBUFF_DATA_USES_OFFSET 668#ifdef NET_SKBUFF_DATA_USES_OFFSET
669 skb->end = size; 669 skb->end = size;
670 off = nhead;
670#else 671#else
671 skb->end = skb->head + size; 672 skb->end = skb->head + size;
673#endif
672 /* {transport,network,mac}_header and tail are relative to skb->head */ 674 /* {transport,network,mac}_header and tail are relative to skb->head */
673 skb->tail += off; 675 skb->tail += off;
674 skb->transport_header += off; 676 skb->transport_header += off;
675 skb->network_header += off; 677 skb->network_header += off;
676 skb->mac_header += off; 678 skb->mac_header += off;
677#endif
678 skb->cloned = 0; 679 skb->cloned = 0;
679 skb->nohdr = 0; 680 skb->nohdr = 0;
680 atomic_set(&skb_shinfo(skb)->dataref, 1); 681 atomic_set(&skb_shinfo(skb)->dataref, 1);