aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_input.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-04 01:54:12 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:49 -0500
commit2fcb45b6b87914f072314e5b5d9c196f45984683 (patch)
treee5a6cc4101a8b2693799fde9f47abaf480ae2dfc /net/ipv4/xfrm4_input.c
parentbbca17680f82b1ba3122d41e8bc675aebf6d1cf2 (diff)
[IPSEC]: Use the correct family for input state lookup
When merging the input paths of IPsec I accidentally left a hard-coded AF_INET for the state lookup call. This broke IPv6 obviously. This patch fixes by getting the input callers to specify the family through skb->cb. Credit goes to Kazunori Miyazawa for diagnosing this and providing an initial patch. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_input.c')
-rw-r--r--net/ipv4/xfrm4_input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c
index 0c377a66b8b5..33f990d56c91 100644
--- a/net/ipv4/xfrm4_input.c
+++ b/net/ipv4/xfrm4_input.c
@@ -39,6 +39,7 @@ drop:
39int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, 39int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi,
40 int encap_type) 40 int encap_type)
41{ 41{
42 XFRM_SPI_SKB_CB(skb)->family = AF_INET;
42 XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr); 43 XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
43 return xfrm_input(skb, nexthdr, spi, encap_type); 44 return xfrm_input(skb, nexthdr, spi, encap_type);
44} 45}