diff options
author | davem@davemloft.net <davem@davemloft.net> | 2005-03-18 21:39:03 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-05-12 10:00:13 -0700 |
commit | ebf0f01a315493367b4c069cca0b06b99b387fb3 (patch) | |
tree | 8504771be5674bea17a1ddf75da2d1f789820bb7 | |
parent | 1b1530aa9b161a2f9f077f075853063bece4e008 (diff) | |
download | linux-stable-ebf0f01a315493367b4c069cca0b06b99b387fb3.tar.gz linux-stable-ebf0f01a315493367b4c069cca0b06b99b387fb3.tar.bz2 linux-stable-ebf0f01a315493367b4c069cca0b06b99b387fb3.zip |
[PATCH] Fix __xfrm_find_acq_byseq()
This function, as it's name implies, is supposed to only
return IPSEC objects which are in the XFRM_STATE_ACQ
("acquire") state. But it returns any object with the
matching sequence number.
This is wrong and confuses IPSEC daemons to no end.
[XFRM]: xfrm_find_acq_byseq should only return XFRM_STATE_ACQ states.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | net/xfrm/xfrm_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index e43aa8c27483..1fc36538ea62 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -609,7 +609,7 @@ static struct xfrm_state *__xfrm_find_acq_byseq(u32 seq) 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; } |