[IPSEC]: Store idev entries
commitaabc9761b69f1bfa30a78f7005be95cc9cc06175
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 3 May 2005 23:27:10 +0000 (3 16:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 May 2005 23:27:10 +0000 (3 16:27 -0700)
tree50dc9f510011ac03656aeba0595b2b0b5c5f5e22
parentd5d75cd6b10ddad2f375b61092754474ad78aec7
[IPSEC]: Store idev entries

I found a bug that stopped IPsec/IPv6 from working.  About
a month ago IPv6 started using rt6i_idev->dev on the cached socket dst
entries.  If the cached socket dst entry is IPsec, then rt6i_idev will
be NULL.

Since we want to look at the rt6i_idev of the original route in this
case, the easiest fix is to store rt6i_idev in the IPsec dst entry just
as we do for a number of other IPv6 route attributes.  Unfortunately
this means that we need some new code to handle the references to
rt6i_idev.  That's why this patch is bigger than it would otherwise be.

I've also done the same thing for IPv4 since it is conceivable that
once these idev attributes start getting used for accounting, we
probably need to dereference them for IPv4 IPsec entries too.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_policy.c