diff options
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index b276d04d6db5..710325e7a842 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -64,6 +64,7 @@ static LIST_HEAD(ipcomp6_tfms_list); | |||
64 | 64 | ||
65 | static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | 65 | static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) |
66 | { | 66 | { |
67 | int nexthdr; | ||
67 | int err = -ENOMEM; | 68 | int err = -ENOMEM; |
68 | struct ip_comp_hdr *ipch; | 69 | struct ip_comp_hdr *ipch; |
69 | int plen, dlen; | 70 | int plen, dlen; |
@@ -79,6 +80,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
79 | 80 | ||
80 | /* Remove ipcomp header and decompress original payload */ | 81 | /* Remove ipcomp header and decompress original payload */ |
81 | ipch = (void *)skb->data; | 82 | ipch = (void *)skb->data; |
83 | nexthdr = ipch->nexthdr; | ||
84 | |||
82 | skb->transport_header = skb->network_header + sizeof(*ipch); | 85 | skb->transport_header = skb->network_header + sizeof(*ipch); |
83 | __skb_pull(skb, sizeof(*ipch)); | 86 | __skb_pull(skb, sizeof(*ipch)); |
84 | 87 | ||
@@ -108,7 +111,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
108 | skb->truesize += dlen - plen; | 111 | skb->truesize += dlen - plen; |
109 | __skb_put(skb, dlen - plen); | 112 | __skb_put(skb, dlen - plen); |
110 | skb_copy_to_linear_data(skb, scratch, dlen); | 113 | skb_copy_to_linear_data(skb, scratch, dlen); |
111 | err = ipch->nexthdr; | 114 | err = nexthdr; |
112 | 115 | ||
113 | out_put_cpu: | 116 | out_put_cpu: |
114 | put_cpu(); | 117 | put_cpu(); |