diff options
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r-- | net/xfrm/xfrm_input.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 5cad522e8ef6..cce9d4586045 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -102,7 +102,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
102 | __be32 seq; | 102 | __be32 seq; |
103 | struct xfrm_state *x; | 103 | struct xfrm_state *x; |
104 | int decaps = 0; | 104 | int decaps = 0; |
105 | unsigned int nhoff = XFRM_SPI_SKB_CB(skb)->nhoff; | ||
106 | unsigned int daddroff = XFRM_SPI_SKB_CB(skb)->daddroff; | 105 | unsigned int daddroff = XFRM_SPI_SKB_CB(skb)->daddroff; |
107 | 106 | ||
108 | /* Allocate new secpath or COW existing one. */ | 107 | /* Allocate new secpath or COW existing one. */ |
@@ -157,8 +156,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
157 | goto drop_unlock; | 156 | goto drop_unlock; |
158 | } | 157 | } |
159 | 158 | ||
160 | skb_network_header(skb)[nhoff] = nexthdr; | ||
161 | |||
162 | /* only the first xfrm gets the encap type */ | 159 | /* only the first xfrm gets the encap type */ |
163 | encap_type = 0; | 160 | encap_type = 0; |
164 | 161 | ||
@@ -170,6 +167,8 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
170 | 167 | ||
171 | spin_unlock(&x->lock); | 168 | spin_unlock(&x->lock); |
172 | 169 | ||
170 | XFRM_MODE_SKB_CB(skb)->protocol = nexthdr; | ||
171 | |||
173 | if (x->inner_mode->input(x, skb)) | 172 | if (x->inner_mode->input(x, skb)) |
174 | goto drop; | 173 | goto drop; |
175 | 174 | ||