aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/esp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/esp6.c')
-rw-r--r--net/ipv6/esp6.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 7aff380e74ef..35905867ded1 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -42,21 +42,18 @@
42static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) 42static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
43{ 43{
44 int err; 44 int err;
45 int hdr_len;
46 struct ipv6hdr *top_iph; 45 struct ipv6hdr *top_iph;
47 struct ipv6_esp_hdr *esph; 46 struct ipv6_esp_hdr *esph;
48 struct crypto_blkcipher *tfm; 47 struct crypto_blkcipher *tfm;
49 struct blkcipher_desc desc; 48 struct blkcipher_desc desc;
50 struct esp_data *esp;
51 struct sk_buff *trailer; 49 struct sk_buff *trailer;
52 int blksize; 50 int blksize;
53 int clen; 51 int clen;
54 int alen; 52 int alen;
55 int nfrags; 53 int nfrags;
56 54 struct esp_data *esp = x->data;
57 esp = x->data; 55 int hdr_len = (skb_transport_offset(skb) +
58 hdr_len = skb->h.raw - skb->data + 56 sizeof(*esph) + esp->conf.ivlen);
59 sizeof(*esph) + esp->conf.ivlen;
60 57
61 /* Strip IP+ESP header. */ 58 /* Strip IP+ESP header. */
62 __skb_pull(skb, hdr_len); 59 __skb_pull(skb, hdr_len);