From: Patrick McHardy <kaber@trash.net>
To: Steve Hill <steve@services.navaho.net>
Cc: netdev@oss.sgi.com, "David S. Miller" <davem@davemloft.net>
Subject: Re: IPSEC
Date: Tue, 08 Mar 2005 18:44:39 +0100 [thread overview]
Message-ID: <422DE487.5020800@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0503081706560.11525@sorbus2.navaho>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Steve Hill wrote:
> then the ESP SA is added and it has the same sequence number (1) as the
> AH SA so the AH SA gets deleted.
>
> The xfrm_state_add() function does:
> x1 = __xfrm_find_acq_byseq(x->km.seq);
> ...
> xfrm_state_delete(x1);
> And this is responsible for deleting the AH SA due to it's matching
> sequence number.
This is a bug in the kernel, __xfrm_find_acq_byseq should only return
XFRM_STATE_ACQ states. This patch should fix it.
Signed-off-by: Patrick McHardy <kaber@trash.net>
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 420 bytes --]
===== net/xfrm/xfrm_state.c 1.55 vs edited =====
--- 1.55/net/xfrm/xfrm_state.c 2005-03-07 06:23:53 +01:00
+++ edited/net/xfrm/xfrm_state.c 2005-03-08 18:42:13 +01:00
@@ -609,7 +609,7 @@
for (i = 0; i < XFRM_DST_HSIZE; i++) {
list_for_each_entry(x, xfrm_state_bydst+i, bydst) {
- if (x->km.seq == seq) {
+ if (x->km.seq == seq && x->km.state == XFRM_STATE_ACQ) {
xfrm_state_hold(x);
return x;
}
next prev parent reply other threads:[~2005-03-08 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 17:25 IPSEC Steve Hill
2005-03-08 17:44 ` Patrick McHardy [this message]
2005-03-09 17:01 ` IPSEC Steve Hill
2005-03-11 2:40 ` IPSEC David S. Miller
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=422DE487.5020800@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
--cc=steve@services.navaho.net \
/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).