diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-10 18:46:21 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:56 -0400 |
commit | 631a6698d09e57cadc069914d613899609a0ae83 (patch) | |
tree | 7e915991e7dea60077e2f160908820c90e34fb18 /net/ipv4/esp4.c | |
parent | ceb1eec8291175686d0208e66595ff83bc0624e2 (diff) |
[IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c
This patch makes the IPv4 x->type->input functions return the next protocol
instead of setting it directly. This is identical to how we do things in
IPv6 and will help us merge common code on the input path.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/esp4.c')
-rw-r--r-- | net/ipv4/esp4.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 8377bedf3f6..6b1a31a74cf 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -257,12 +257,11 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) | |||
257 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 257 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
258 | } | 258 | } |
259 | 259 | ||
260 | iph->protocol = nexthdr[1]; | ||
261 | pskb_trim(skb, skb->len - alen - padlen - 2); | 260 | pskb_trim(skb, skb->len - alen - padlen - 2); |
262 | __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen); | 261 | __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen); |
263 | skb_set_transport_header(skb, -ihl); | 262 | skb_set_transport_header(skb, -ihl); |
264 | 263 | ||
265 | return 0; | 264 | return nexthdr[1]; |
266 | 265 | ||
267 | out: | 266 | out: |
268 | return -EINVAL; | 267 | return -EINVAL; |