[SK_BUFF]: Introduce skb_transport_offset()
For the quite common 'skb->h.raw - skb->data' sequence. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
badff6d01a
commit
ea2ae17d64
@@ -27,7 +27,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
|
||||
int nfrags;
|
||||
|
||||
/* Strip IP+ESP header. */
|
||||
__skb_pull(skb, skb->h.raw - skb->data);
|
||||
__skb_pull(skb, skb_transport_offset(skb));
|
||||
/* Now skb is pure payload to encrypt */
|
||||
|
||||
err = -ENOMEM;
|
||||
|
Reference in New Issue
Block a user