netdev
[Top] [All Lists]

[IPSEC] Store idev entries (was: [PATCH][IPv6][IPsec] stop infinite loop

To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" <yoshfuji@xxxxxxxxxxxxxx>
Subject: [IPSEC] Store idev entries (was: [PATCH][IPv6][IPsec] stop infinite loop)
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 18:23:39 +1000
Cc: kazunori@xxxxxxxxxxxx, davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, usagi-core@xxxxxxxxxxxxxx
In-reply-to: <20050430031159.GA24326@xxxxxxxxxxxxxxxxxxx>
References: <4272EC95.20401@xxxxxxxxxxxx> <20050430.120736.45974367.yoshfuji@xxxxxxxxxxxxxx> <20050430031159.GA24326@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
Hi:

I had no luck in reproducing the infinite loop so I'll need someone
to send me a back trace or better instructions in getting it to go.

However, I did find 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@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: xfrm-idev
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>