[Top] [All Lists]

Re: IPsec xfrm resolution

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: IPsec xfrm resolution
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Sat, 19 Feb 2005 20:53:33 +0100
Cc: Maillist netdev <netdev@xxxxxxxxxxx>
In-reply-to: <20050219190333.GA22166@xxxxxxxxxxxxxxxxxxx>
References: <20050210202810.GA1609@xxxxxxxxxxxxxxxxxxx> <42144C3F.2060501@xxxxxxxxx> <20050217091137.GA9476@xxxxxxxxxxxxxxxxxxx> <42152841.5000707@xxxxxxxxx> <20050218100854.GA19427@xxxxxxxxxxxxxxxxxxx> <4216D6B4.5070901@xxxxxxxxx> <20050219092314.GA8153@xxxxxxxxxxxxxxxxxxx> <42173125.3040505@xxxxxxxxx> <20050219183202.GA10773@xxxxxxxxxxxxxxxxxxx> <421789AF.4020705@xxxxxxxxx> <20050219190333.GA22166@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050106 Debian/1.7.5-1
Herbert Xu wrote:

On Sat, Feb 19, 2005 at 07:47:11PM +0100, Patrick McHardy wrote:
That's a bug.  How can you forward packets properly if the tunnel mode
SA is missing?
Using normal routing. What meaning would "optional" have otherwise ?
If the encapsulation has to be done, the user shouldn't mark the SA
as optional in my opinion.

In that case you can't mark IPCOMP SAs as optional in this scenario
which is the most common application of optional:

IPCOMP(tunnel) -- ESP(transport)
I've checked KAME, it also skips IPSEC_LEVEL_USE SAs if they aren't present.
IPCOMP in tunnel mode is a special case. It wants to express more than just
"optional". It means to say "use SA if present and some things wrt. size apply,
otherwise use a similar SA with proto=IPIP". One of both has to be used, and
this is what "optional" can't express. The current method is to use the IPIP
SA automatically created with the IPCOMP SA when the compressed size exceeds
the uncompressed size, but it doesn't handle a missing SA. This suggests we
need to special-case tunnel mode IPCOMP in xfrm_tmpl_resolve() and either
ignore "optional" for IPIP tunnel mode SAs or create them on demand.


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