From: James Morris <jmorris@namei.org>
To: Joy Latten <latten@austin.ibm.com>
Cc: netdev@vger.kernel.org, paul.moore@hp.com,
vyekkirala@TrustedCS.com, herbert@gondor.apana.org.au,
davem@davemloft.net
Subject: Re: when having to acquire an SA, ipsec drops the packet
Date: Thu, 1 Feb 2007 18:44:48 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0702011819070.11820@d.namei> (raw)
In-Reply-To: <1170370281.2603.359.camel@faith.austin.ibm.com>
On Thu, 1 Feb 2007, Joy Latten wrote:
> IPsec returns EAGAIN when it needs to acquire an SA.
> There have been a thread or two about this...
> Has there been any info or progress in how best to fix this?
>
> James Morris presented some work/ideas,
> http://vger.kernel.org/jmorris_ipsec_sa_resolution_netconf2006.pdf
The status of this is that I started refactoring some core IPv6 code (to
bring it in line with the IPv4 code, e.g. create an ip6_route_connect() to
match ip_route_connect(), and manage the packet queuing from there) and
ran into some IPv6 bugs, and fixed those, but then ran out of time on the
IPsec stuff. AFAIK, no other progress has been made.
Generally, the problem is only seen when using the BSD userland, which
does not proactively maintain SAs. Openswan does, and general IPsec users
running it never see the problem, so it's not clear how high the priority
is for fixing this really is in the general case. It's quite a lot of
surgery on core networking to fix a problem which doesn't occur with the
Linux tools, which seemingly most people use when they're not using
proprietary and/or userland IPsec stacks.
Non-kernel options include moving to Openswan (which I would hope is
getting labeled networking support at some stage in any case), or have the
BSD code proactively maintain SAs.
Also, applications using TCP, and UDP applications with their own session
management, will resend packets while the SA is being negotiated, which
I've observed as typically completing before the first resend. I think
one of the practical problems with this is that the apps are not expecting
an EAGAIN and thus decide to crash.
A quick & dirty solution, which is what I think the BSD kernels do, is to
still drop the packet but just not return an error to the app. The app
then just sees a slight delay on the initial connection, as if a DNS
lookup took a bit longer than usual.
> When using labeled xfrms (xfrms that contain a security context), there
> is potential for a greater amount of SAs to be created than when using
> regular xfrms. An SA may be created every time a different security
> context is encountered in a particular traffic stream. This could be
> many if each networking app has its own security context, making current
> behavior problematic.
Do you have any examples of how many SAs would need to be created on a
typical system?
It may not be the end of the world if an MLS box has to negotiate a
whole bunch of SAs when it boots up.
- James
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2007-02-01 23:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 22:51 when having to acquire an SA, ipsec drops the packet Joy Latten
2007-02-01 23:44 ` James Morris [this message]
2007-02-02 15:30 ` Paul Moore
2007-02-05 4:53 ` David Miller
2007-02-05 16:33 ` James Morris
2007-02-05 20:34 ` James Morris
2007-02-05 21:07 ` David Miller
2007-02-05 20:49 ` Venkat Yekkirala
2007-02-05 21:11 ` David Miller
2007-02-05 20:53 ` Joy Latten
2007-02-05 21:13 ` David Miller
2007-02-05 20:52 ` Joy Latten
-- strict thread matches above, loose matches on Subject: below --
2007-02-07 16:33 Joy Latten
2007-03-06 1:47 Joy Latten
2007-03-06 3:21 ` James Morris
2007-03-06 17:14 ` Joy Latten
2007-03-06 19:40 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0702011819070.11820@d.namei \
--to=jmorris@namei.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=latten@austin.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.com \
--cc=vyekkirala@TrustedCS.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).