Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56eb8882 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29f6af77
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);