[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>
This commit is contained in:

committed by
David S. Miller

parent
ceb1eec829
commit
631a6698d0
@@ -257,12 +257,11 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
|
||||
iph->protocol = nexthdr[1];
|
||||
pskb_trim(skb, skb->len - alen - padlen - 2);
|
||||
__skb_pull(skb, sizeof(*esph) + esp->conf.ivlen);
|
||||
skb_set_transport_header(skb, -ihl);
|
||||
|
||||
return 0;
|
||||
return nexthdr[1];
|
||||
|
||||
out:
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user