diff options
author | Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> | 2007-02-13 20:54:47 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-02-13 20:54:47 (GMT) |
commit | c0d56408e3ff52d635441e0f08d12164a63728cf (patch) | |
tree | 026b531a00255730e9878905fdc2e6a910f4e1c7 /net/ipv4/xfrm4_input.c | |
parent | 600ff0c24bb71482e7f0da948a931d5c5d72838a (diff) | |
download | linux-c0d56408e3ff52d635441e0f08d12164a63728cf.tar.xz |
[IPSEC]: Changing API of xfrm4_tunnel_register.
This patch changes xfrm4_tunnel register and deregister
interface to prepare for solving the conflict of device
tunnels with inter address family IPsec tunnel.
Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_input.c')
-rw-r--r-- | net/ipv4/xfrm4_input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 289146b..78e80de 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c @@ -27,6 +27,7 @@ static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 { switch (nexthdr) { case IPPROTO_IPIP: + case IPPROTO_IPV6: *spi = skb->nh.iph->saddr; *seq = 0; return 0; @@ -70,7 +71,8 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) if (xfrm_nr == XFRM_MAX_DEPTH) goto drop; - x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, iph->protocol, AF_INET); + x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, + iph->protocol != IPPROTO_IPV6 ? iph->protocol : IPPROTO_IPIP, AF_INET); if (x == NULL) goto drop; |